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

[lua][error][solved]building API

Started by Jappards, 14 April 2013 - 07:38 PM
Jappards #1
Posted 14 April 2013 - 09:38 PM
i am having a problem with my building API
it says:lua:52:attempt to index(a nil value).
the API is called building.
code:

function floorLine(length)
for i=1,length do
  turtle.placeDown()
  turtle.forward()
end
end
function wallLine(hight)
for i=1,hight do
  turtle.place()
  turtle.up()
end
end
function ceilingLine(length)
for i=1,length do
  turtle.placeUp()
  turtle.forward()
end
end
Spongy141 #2
Posted 14 April 2013 - 09:39 PM
is this all your code? because it says the error is on line 52… there's no line 52…
Imque #3
Posted 14 April 2013 - 09:39 PM
Is this all of your code?


EDIT: Sorry Spongy141 your post didnt update.
Jappards #4
Posted 14 April 2013 - 09:48 PM
yes this is all my code, but it says:lua:52:attempt to index(a nil value)
not building:52:attempt to index(a nil value)
but on some sort of way it didn`t work in a certain location, really weird.
it works now.
money #5
Posted 14 April 2013 - 10:37 PM
maybe you should do local function NAME (string) instead of function NAME (string)