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

startup :37: attempt to call nil

Started by Asaous, 29 January 2014 - 11:16 AM
Asaous #1
Posted 29 January 2014 - 12:16 PM
I keep getting this error every time I try to make a passworded door but I don't have 37 lines of coding so I'm slightly confused and need help.The coding is bellow:

pass = "qwerty"

print ("Enter TNTInc's Password")

input = read("*")

if input == pass then

redstone.setOutput ("left", true )

sleep(3)

os.shutdown()

else

print ("Nice try Tom")

sleep(2)

os.shutdown()

end
Goof #2
Posted 29 January 2014 - 01:19 PM
Ehhm? theres no errors in that code.

Are you using multiple programs ?

Whats the program name? ( i guess its startup ).

Try checking if you typed something wrong elsewhere…


Can't help you any further because the code given is working.
Asaous #3
Posted 29 January 2014 - 05:32 PM
That's what I was thinking but I can't find any errors at all in the coding anywhere else
Agoldfish #4
Posted 29 January 2014 - 07:30 PM
Given that pass isn't local, do you use pass in any other programs? That could be the problem.
Asaous #5
Posted 30 January 2014 - 11:08 AM
I don't use a password in any other programs, this is my only one
CometWolf #6
Posted 30 January 2014 - 12:16 PM
He meant the variable name "pass", but since the scripts wouldn't be running simoulteanously, that isn't the issue. Is this the actual code, or did you write it in by hand?
Asaous #7
Posted 30 January 2014 - 02:01 PM
I wrote the code on the computer with help from other sources
CometWolf #8
Posted 30 January 2014 - 02:04 PM
No, what i mean is, is this the exact code you are running on the computer in minecraft? That you got on here by either uploading to pastebin or copying the actual file from your minecraft folder. Or did you re-type it to get it on here?
Agoldfish #9
Posted 30 January 2014 - 02:08 PM
To ensure it is go into your computer and type:

pastebin put <filename>
And with that weird code thing, go to your internet browser and type:

pastebin.com/<code>
Then link us to it.
karelmikie3 #10
Posted 30 January 2014 - 02:57 PM
do you have any other programs on that computer? and could you give a pastebin link to your program
Asaous #11
Posted 30 January 2014 - 03:53 PM
I tried doing that but I think im on an outdated version of CC as I'm using the one in Tekkit Classic