Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   Bugs and Troubleshooting (http://www.alice.org/community/forumdisplay.php?f=18)
-   -   Project Saving Issue (2.3) (http://www.alice.org/community/showthread.php?t=9721)

atomcollider 12-01-2012 09:46 PM

Project Saving Issue (2.3)
 
1 Attachment(s)
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.

CellularDecay 04-15-2013 05:20 PM

Ah yes, Alice, the world's first write-only programming environment. You can save your programs, but you can't reload them later. :p

I've had this happen several times, and, in my case at least, it seems to be caused by something that I deleted still getting saved. In other words, it looks like Alice does not always delete things correctly. I delete something, and it seems to go away, but some part of it is still referenced in the save file, and that causes an error when attempting to reload the code later.

(Alice 2.3)

PS: Some might argue that APL was the first write-only programming language, but you'd have to be pretty old to get that joke. ;)


All times are GMT -5. The time now is 07:19 PM.

Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.