View Single Post
Project Saving Issue (2.3)
Old
atomcollider
Guest
 
Status:
Posts: n/a
Default Project Saving Issue (2.3) - 12-01-2012, 10:46 PM

I was working on a project for class; we had to make a board game in the alice world. I chose to do connect 4. I got done coding everything, including the 4 in a row detection. It worked perfectly, until I saved it. Opening it back up, alice throws up an error. The peculiar thing is, if I go into my "win detection" methods (there are 3, one for horizontal, vertical, and diagonal), and simply re-code the IF statements that check a list for a color, in the exact same way, it works again, until I save it. I have the project attached. Is this a bug? Or do I have to code my program in a different way?

EDIT --

It seems to be the way I coded it doesn't get saved properly. I redid the program another way, using one huge list for all the "slots", and simply advancing by an offset value (6 for horizontal, 1 for vertical, and 7 or 5 for diagonal, for each of the two cross directions). Alice apparently doesn't like complex methods involving rapidly changing lists, which is what I had before. Now I just have a static list for win detection, and just use a couple number variables to keep track. It works perfectly now. I would be interested to know why this error happens, though, and if it's fixed in 3.x.
Attached Files
File Type: a2w ConnectFour_R4.a2w (487.8 KB, 4 views)

Last edited by atomcollider; 12-02-2012 at 09:02 PM. Reason: Problem Discovered
   
Reply With Quote