Author Topic: Rule List Editor... bug?  (Read 3711 times)

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Rule List Editor... bug?
« on: 2010-03-27, 11:00:47 AM »
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, 11:06:43 AM by durnurd »
Edward Dassmesser