This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
nitrogenfingers's profile picture

Inconsistent Runtime Behaviour

Started by nitrogenfingers, 16 April 2012 - 04:16 PM
nitrogenfingers #1
Posted 16 April 2012 - 06:16 PM
This is a sort of complicated question, I'm not sure how best to ask it.

The program I'm working on, this chess program is up to about 1300 lines now, and I've just started adding network code which seems to be causing erratic runtime behaviour, although how my program has been running has been erratic long before that.
The first time a computer is booted up if the program is run a nil pointer error occurs. The second time, running the exact same file works does work, well at least until you attempt to connect to another computer- then both computers will simultaneously crash on a line of code not technically reachable. A few such events occur on different iterations of the program.

I'm also noticing it usually takes once or twice to run the program before it updates changes from the previous execution, which is extremely confusing. If I change the source code by, for example adding a print line statement I will have to run the program a minimum of twice on a computer for the changes to update.

Not really sure what's causing this, I've never seen it before. The code is the same as that posted on the topic "Minecraft Chess" in the program library, an earlier version minus the networking code (as this seems to be what is causing the program to break). The broken code is here: http://www.mediafire.com/download.php?iux3dw5w6vuhwtu

Any help is of course appreciated.

Nitrogen Fingers
Hawk777 #2
Posted 19 April 2012 - 07:39 AM
"Invalid or Deleted File" error on MediaFire link.