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

Help Me A Program

Started by karadeli, 17 July 2013 - 03:03 PM
karadeli #1
Posted 17 July 2013 - 05:03 PM
http://pastebin.com/fS1gztKU

I have a turtle program but its give a error

crucible:45:attemp to call nil


Please help me
ZagKalidor #2
Posted 17 July 2013 - 05:37 PM
half of your code is meant to be inserted into table util.
you open the table in line 6 and close it in line 38.

further on, you call table util.send, but there is no valid table util

you seem to open a function called util but made it to a table
seems like you just forgot to insert the code of function util

also, like said before, 2 peripherals wrapped on the same side is not good
you call scanner where it is supposed to be a modem
albrat #3
Posted 17 July 2013 - 08:30 PM
@ZagKalidor : - util is a table containing Functions. I have seen this approach before… All the functions are called from the table.

so when you see util.send("none") it's sending the command send to the table which calls the function send with the variable "none"
it's a different way of storing functions.


To the problem…

  local aspects = scanner.getAspectsDown()
What is the scanner on the right side ?
What is the command getAspectsDown() ?

as far as I can see the program is trying to find a value but finding nothing. Btw, I would do ' local aspects = "" ' at the beginning of your file to define aspects in the first place.

What addon are you using with the turtle ?
karadeli #4
Posted 18 July 2013 - 05:10 AM
I use wireless thaum scanner turtle. And what should ı do ?????
karadeli #5
Posted 18 July 2013 - 05:23 AM
Thanks ı solve this problem