local tArgs = { ... }
currsel=1
if #tArgs == 2 then
height = tonumber(tArgs[1])
length = tonumber(tArgs[2])
for i=1,4 do
for j=1,(length-1) do
for k=1,height do
turtle.up()
if turtle.getItemCount(crrsel) ~= 0 then
turtle.placeDown()
else
print("If no more blocks, please add more! Unless you like me spazzing out!")
local testmore = false
while testmore ~= true do
if currsel == 16 then
currsel = 1
else
currsel = currsel + 1
end
if turtle.getItemCount(tonumber(crrsel)) ~= 0 then
local testmore = true
end
end
end
end
turtle.forward()
while not turtle.detectDown() do
turtle.down()
end
end
turtle.turnRight()
end
else
print("Usage: walls <height> <length>")
sleep(2)
end
[Error/Bug] [Turtle] Expected Number
Started by Emma, Dec 09 2012 11:45 AM
2 replies to this topic
#1
Posted 09 December 2012 - 11:45 AM
Hi, i am fairly new to computercraft and I developing some code but it keeps giving me Expected Number for line 10 can you help?
#2
Posted 09 December 2012 - 11:46 AM
You declare currsel, but use crrsel in that line, which will be nil.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












