Josh @ Dreamland
|
|
Reply #15 Posted on: November 23, 2008, 06:04:01 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
Whew. For a minute there I was afraid everyone'd be like ZOMG NO DUN HURT OUR PRESHIS ERRORZ
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
|
|
|
ludamad
|
|
Reply #20 Posted on: November 24, 2008, 02:43:51 pm |
|
|
Joined: May 2008
Posts: 1256
|
Bigmoron is of course right, it is not so clear cut, lets look at the affected areas (according to Josh): List of typical errors:
* Accessing an undefined sprite: Fatal, debug mode will report it * Accessing an undefined script: Will error at compile time * Accessing any other undefined resource: Fatal, debug mode will report it * Going past an array limit in a VAR: Not fatal, don't think debug mode will report it though * Going past an array limit with pointers: Just fatal. It's a C++ thing. * Division by zero: Fatal, debug mode will report it in var, cannot report it with int/double/etc * Nonexisting variable: Totally impossible, may implement something to track that Accessing an undefined sprite is virtually impossible as long as you use sprite names, as well as undefined scripts with script names and other resources. Going past an array limit in var or C++ arrays could be a problem - however one could easily create an array structure that errors when out of bounds (with C++, and then release as a ENIGMA lib). Such a thing would be recommended for early stages, and possibly removed when the code is confident enough to be bug free. Bigmoron's point is very valid - the people playing your game can be your biggest bug testers. As for divide by zero, I'm not sure how one would handle that nicely, especially if you plan to use C++ types (which anyone and everyone should opt for over Var). And Nonexisting variable? Probably not a huge issue, though I'm not exactly certain what Josh means.
|
|
|
Logged
|
|
|
|
|
|
|
|
Josh @ Dreamland
|
|
Reply #25 Posted on: November 25, 2008, 06:43:21 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
Since the game wouldn't compile if there were any truly undefined variables, they just don't exist in ENIGMA. So here, undefined means that you didn't say varname=something; before you said if(varname) or function(varname).
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
|
Chris94
|
|
Reply #28 Posted on: November 27, 2008, 08:10:05 pm |
|
|
Location: Canada Joined: Aug 2008
Posts: 8
|
Sounds great! I'll be looking forward to any new releases! Chris94
|
|
« Last Edit: November 28, 2008, 05:08:36 pm by Chris94 »
|
Logged
|
|
|
|
|