Posted 18 June 2016 - 07:42 AM
Hope someone can help me with this maddening problem.
I am trying to write a program that will make a turtle construct a platform, based on the length and width entered by the user. The turtle is supposed to "snake" back and forth, placing blocks, until the platform is complete.
In the program, an IF statement tests the platform_length variable against a counter, and when they equal it should execute the "first turn". My problem is that Lua never believes those 2 variables to be equal, even though a print statement I put in there for debugging shows that they are!
The program does execute the "second turn", which is a similar expression, so I can't work out why my "first turn" is not working. The code is simple, so I can only think I'm missing a Lua fundamental?
The program is here: http://pastebin.com/D8EtHNpr
thanks in advance if you can help!
I am trying to write a program that will make a turtle construct a platform, based on the length and width entered by the user. The turtle is supposed to "snake" back and forth, placing blocks, until the platform is complete.
In the program, an IF statement tests the platform_length variable against a counter, and when they equal it should execute the "first turn". My problem is that Lua never believes those 2 variables to be equal, even though a print statement I put in there for debugging shows that they are!
The program does execute the "second turn", which is a similar expression, so I can't work out why my "first turn" is not working. The code is simple, so I can only think I'm missing a Lua fundamental?
The program is here: http://pastebin.com/D8EtHNpr
thanks in advance if you can help!