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

Lua help strip mining program

Started by leetfail, 04 January 2013 - 08:30 AM
leetfail #1
Posted 04 January 2013 - 09:30 AM
I was trying to write a strip mining program off of previous knowledge of code. I probably made some rookie mistake I am not catching, but the turtle debugging tells me that I am trying to compare a string to a number, even though I have it declared as what I would think is a number. It would also help if you could point out any fatal flaws in the program (there is probably at least 1, xD)
Code: pastebin.com/Jsnt12z1
Thanks!
P.S i know this is probably the most common program, but I would like to try to make one on my own to help me learn the code
remiX #2
Posted 04 January 2013 - 09:47 AM
This should be in Ask a Pro

Also change the second line to this:
length = tonumber(tArgs[1])

You're trying to do arithmetic on strings.
leetfail #3
Posted 04 January 2013 - 09:51 AM
Thanks, and sorry.