error in script, faster way to fix error

Ideas for Game Editor evolution.

error in script, faster way to fix error

Postby NightOfHorror » Fri Feb 18, 2011 8:05 pm

When you press ok when done with script and error in script box appears a lot of people are stumped, unless you are Bee, fuzzy, DST, at where error(s) is especially in huge code, and I think all characters (words numbers, signs) should turn a color not used already in script right when error is made so it could save time, even just seconds, on code.
viewtopic.php?f=2&t=12136
"I have not failed. I just found 10,000 ways that wont work." quoted by Thomas Edison.
Over the year, I decided my motto for me is I am knowledgeable, but not practical.
User avatar
NightOfHorror
 
Posts: 1823
Joined: Fri Aug 27, 2010 2:50 am
Location: Cedar Hill, MO, of the USA
Score: 51 Give a positive score

Re: error in script, faster way to fix error

Postby Bee-Ant » Sat Feb 19, 2011 3:15 am

The current system will give an error information only on it's line number right?
What annoys us is we need to count the given line from the top line one by one.
I think it will be much helpful if ScriptEditor add the line number on the left side window :)
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: error in script, faster way to fix error

Postby skydereign » Sat Feb 19, 2011 3:54 am

Well, you don't need to count them exactly. The editor tells you what line you are currently on, so you know pretty much where the error is occurring.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: error in script, faster way to fix error

Postby NightOfHorror » Sun Feb 20, 2011 5:27 am

still, I find it faster method, like in Microsoft Word when there is spelling or grammar error it tells you right away when your wrong
viewtopic.php?f=2&t=12136
"I have not failed. I just found 10,000 ways that wont work." quoted by Thomas Edison.
Over the year, I decided my motto for me is I am knowledgeable, but not practical.
User avatar
NightOfHorror
 
Posts: 1823
Joined: Fri Aug 27, 2010 2:50 am
Location: Cedar Hill, MO, of the USA
Score: 51 Give a positive score

Re: error in script, faster way to fix error

Postby Bee-Ant » Sun Feb 20, 2011 12:06 pm

NightOfHorror wrote:still, I find it faster method, like in Microsoft Word when there is spelling or grammar error it tells you right away when your wrong

Do you want GE checks the error correction everytime you type the letter of codes?
Wouldn't it just make it to be incredibly slow??? :shock:
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: error in script, faster way to fix error

Postby Game A Gogo » Sun Feb 20, 2011 12:29 pm

Adding a "Test check" button would make everyone happy.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: error in script, faster way to fix error

Postby DST » Sun Feb 20, 2011 3:57 pm

Ge error checking is standard, as i would expect to find in any script parser. There are two things that are expected of the user, however, with most languages:

1. You understand the language to an extent that you can understand why it errs.

2. You don't cram too much junk into your lines.

The more junk you cram into one line, the more possible errors you can have there. It is better to declare variables, and set those first, then use them in the code, rather than doing your calculations inside function args.

moveto(player.x-view.x+100-enemy.x/2, 100); <----don't do complex math inside function calls.

int xx=player.x-view.x+100-(enemy.x/2) <----instead, do the math outside in a local variable.
moveto(xx, 100);

And that's just an example, there is much more to it, not just that we do the math outside the function, but that we do the math in segments so we can reuse portions of it. Ever see this?

this->x=x+(width/2); that->x=x+(width/2); <----a lot of possible errors in this line


instead,
int x2=x+(width/2); <----now the error will be specific to the line; you'll know what's wrong instantly.
this->x=x2;
that->x=x2;

This is not only for error checking, but also so you can handle and reuse variables. Sometimes you have to make changes, but the changes you make are nested deep inside a line of math inside a function call and hard to edit or error check or reuse. It's sloppy coding and it hurts you in the long run.

Just for fun, who here can tell me what 'Read Error in invalid memory Area" means? Once you understand what causes that error, it makes complete sense. The error is a perfect description of what's wrong.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: error in script, faster way to fix error

Postby Bee-Ant » Sun Feb 20, 2011 5:45 pm

DST wrote:who here can tell me what 'Read Error in invalid memory Area" means?

viewtopic.php?f=2&t=7193
Just found a topic mentions it.

Anyway, it sounds like array out of bound?
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: error in script, faster way to fix error

Postby NightOfHorror » Mon Feb 21, 2011 1:02 am

Bee-Ant wrote:
NightOfHorror wrote:still, I find it faster method, like in Microsoft Word when there is spelling or grammar error it tells you right away when your wrong

Do you want GE checks the error correction everytime you type the letter of codes?
Wouldn't it just make it to be incredibly slow??? :shock:

No Bee, I mean when your fully done with a code line
viewtopic.php?f=2&t=12136
"I have not failed. I just found 10,000 ways that wont work." quoted by Thomas Edison.
Over the year, I decided my motto for me is I am knowledgeable, but not practical.
User avatar
NightOfHorror
 
Posts: 1823
Joined: Fri Aug 27, 2010 2:50 am
Location: Cedar Hill, MO, of the USA
Score: 51 Give a positive score


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest