Jump to content


what means "attempt call nil


3 replies to this topic

#1 hopeless

    Clueless

  • New Members
  • 5 posts

Posted 10 May 2012 - 06:06 PM

i made program and it worked then i changed the code. it didn't work so i changed it back and now it says: Attempt call nil
please help.




#2 hopeless

    Clueless

  • New Members
  • 5 posts

Posted 10 May 2012 - 06:28 PM

pass"password"

print("Reactor Control Console")
write"Password:"
input=read("*")
if pass==input then
print("Password Correct!")
sleep(2)
term.clear()
term.setCursorPos(1,1)
print("Reactor Control Console")
sleep(10)
x=5
while x>0 do
rs.setOutput("back",true)
print("Reactor is Active!")
sleep(30)
rs.setOutput("back",false)
print("Reactor is in Cooldown mode!")
sleep(30)
print("180seconds cooldown left.")
sleep(30)
print("150seconds cooldown left.")
sleep(30)
print("120seconds cooldown left.")
sleep(30)
print("90seconds cooldown left.")
sleep(30)
print("60seconds cooldown left.")
sleep(30)
print("30seconds cooldown left.")
sleep(30)
print("Cooldown is Complete!")
sleep(2)
term.clear()
term.setCursorPos(1,1)
print("Reactor Control Console")
x=x-1
end
print("Program is finished, rebooting")
sleep(2)
os.reboot()
else
print("Password Incorrect!")
sleep(2)
os.reboot()
end


program is saved to startup file. and previously it worked but not anymore... now it says:"Attempt to call nil"

#3 tomass1996

    sυρяємє ovєяloяđ

  • Members
  • PipPipPipPipPip
  • 334 posts
  • LocationNew Zealand

Posted 10 May 2012 - 07:29 PM

pass"password" 
print("Reactor Control Console") 
write"Password:"
Should be:
pass = "password" 
print("Reactor Control Console") 
write("Password:")

Attempt to call nil means you are trying to use/call something that is not defined yet/no value set

#4 hopeless

    Clueless

  • New Members
  • 5 posts

Posted 10 May 2012 - 07:46 PM

thanks. it's working again





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users