1 posts
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/rdn9sbaQnylser
1548 posts
Location
That dark shadow under your bed...
Posted 31 December 2012 - 05:15 AM
could you let us know what it is doing wrong if it is not erroring
2088 posts
Location
South Africa
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