Posted 17 March 2013 - 01:07 AM
This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
startup:3:attempt to call nil
Started by ArronM, 17 March 2013 - 12:07 AMPosted 17 March 2013 - 07:09 AM
Split into new topic.
Try `turtle.drop()` instead.
Try `turtle.drop()` instead.
Posted 17 March 2013 - 07:18 AM
Try moving the while true do statement to the bottom of the program, so the drop function is above it, so the drop function is defined before the loop starts.
Posted 17 March 2013 - 10:39 AM
All source codes are read from top to bottom, here you're trying to call your drop() function before it has been defined.
You should try to get the habit to always define all your functions first, then do your main code after it.
And if I might add, instead of doing
You should give "for" loops a try, like this
You should try to get the habit to always define all your functions first, then do your main code after it.
And if I might add, instead of doing
turtle.select(1)
turtle.dropDown()
turtle.select(2)
turtle.dropDown()
...
...
turtle.select(16)
turtle.dropDown()
You should give "for" loops a try, like this
for slot = 1,16 do
turtle.select(slot)
turtle.dropDown()
end
32-ish lines shrunken to 4 ;)/>