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

[Lua][Question/Help] Room digging turtle

Started by nylser, 31 December 2012 - 03:19 AM
nylser #1
Posted 31 December 2012 - 04:19 AM
Hi there, I'm trying to develop a turtle program that digs out variable size rooms. I havent got any errors with exectution but I dont get whats wrong with this code. Thank you for your help.
Pastebin link: http://pastebin.com/rdn9sbaQ

nylser
KaoS #2
Posted 31 December 2012 - 05:15 AM
could you let us know what it is doing wrong if it is not erroring
remiX #3
Posted 31 December 2012 - 05:41 AM
Please tell us what's wrong with it…

Also:

for i = 1, 3 do
    if tArgs[i] == "0" then
	    print("Usage: ")
	    print("dig <length> <width> <height>")
    end
end

This would be better:
if #tArgs ~= 3 then
    print("Usage: ")
    print("dig <length> <width> <height>")
    return -- Exit the program
end