Posted 01 April 2014 - 01:13 PM
I am currently attempting to rewrite my original Quarry preparation program (A program that would have the turtle dig out a 32x5x32 area for a Buildcraft Quarry to prevent those blocks in that area from being destroyed by the Quarry's setup) to be more versatile and efficient.
While the code is nowhere close to being finished, I've already encountered an error. As I am fairly new to Lua, I expect it to merely be my lack of knowledge on Lua's logic.
http://pastebin.com/YVCLuYU7
Whenever running the code, the error provided, while I am unable to get into the game and quote it directly, states that on line 3, 'Attempted to compare string with number, got string.' I'm fairly certain this means that it attempted to compare "read()" against "> 0" and "<= 64", but failed as the string "read()" is, indeed, a string and not a number. However, entering in a number in for line 1's write string will produce the same result. As will assigning read() to a variable and entering the variable instead, which can be seen in the code as of now.
To reiterate, I'm fairly certain this is little more than many own lack of knowledge on Lua's logic. I would appreciate if someone could inform me on the proper way to format this code so it identifies "read()" as what the user input and not as a string.
While the code is nowhere close to being finished, I've already encountered an error. As I am fairly new to Lua, I expect it to merely be my lack of knowledge on Lua's logic.
http://pastebin.com/YVCLuYU7
Whenever running the code, the error provided, while I am unable to get into the game and quote it directly, states that on line 3, 'Attempted to compare string with number, got string.' I'm fairly certain this means that it attempted to compare "read()" against "> 0" and "<= 64", but failed as the string "read()" is, indeed, a string and not a number. However, entering in a number in for line 1's write string will produce the same result. As will assigning read() to a variable and entering the variable instead, which can be seen in the code as of now.
To reiterate, I'm fairly certain this is little more than many own lack of knowledge on Lua's logic. I would appreciate if someone could inform me on the proper way to format this code so it identifies "read()" as what the user input and not as a string.