Scrolling Game Development Kit Forum
Welcome, Guest. Please login or register.
2010-09-08, 07:04:18 PM

Login with username, password and session length
Search:     Advanced search
8920 Posts in 1007 Topics by 168 Members
Latest Member: mogzdogz
* Home Help Search Login Register
+  Scrolling Game Development Kit Forum
|-+  SGDK Version 2
| |-+  General Discussion
| | |-+  Rule List Editor... bug?
« previous next »
Pages: [1] Print
Author Topic: Rule List Editor... bug?  (Read 78 times)
durnurd
Lead Lemming
Expert
Fanatic
*****
Posts: 1155


Games completed so far: 0

durnurd@hotmail.com
View Profile WWW
« on: 2010-03-27, 12:00:47 PM »

I'm not sure if it would be classified as a bug or just as something that could be improved upon.

If there are more end-ifs than ifs, then a "Empty Stack" message appears, and the build errors appear.  In my case, it was due to an If rule that didn't have a method, so even though the tree looked correct, the If statement was not added to the condition stack, and therefore there was an extra end-if at the end.

My suggestion would be some sort of validation of the rule tree before building to find these errors and point them out visually (i.e. open the tree to their locations and highlight them in red).  That would include any extra end-ifs as well as empty conditional statements, etc.

The easiest solution might be to just have a button on the tool bar that performs the validation separately from building the project, since it was obvious which rule tree was having issues (although I was editing a sprite definition.  I don't know how it would act with plans).  The most user-friendly solution would be to automatically perform validation when building, or perhaps whenever the tree is changed.

The same error showed up when trying to build the project, and when trying to export the code from that rule set, so if validation were to be performed during build, it probably ought to be performed there as well.


ALSO:

A few notes about the message editor:

Resizing horizontally does not move the [...] button.
It might be useful to automatically put quotation marks around the string so that [variable] doesn't show up if you forget.
« Last Edit: 2010-03-27, 12:06:43 PM by durnurd » Logged

Edward Dassmesser
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!