[Lua][Error] startup:27: attempt to call nil
Pricey123 13 Jan 2013
Im not to sure but i guess that this maybe something linked to another problem im having?
http://www.computerc...pt-to-call-nil/
http://www.computerc...pt-to-call-nil/
os.pullEvent = os.pullEventRaw local locker = true local failed = true local attempted_login = true local password_server = 0 rednet.open("right") while locker do attempted_login = false term.clear() term.setCursorPos(1,1) print("Welcome to a USERS PC : Roaming Profile Enabled") print("What would you like to do?") print("[1] Login (*)") print("[2] Shutdown") write("> ") local input = read() if input == "2" then os.shutdown() elseif input == "1" then attempted_login = true print("Please login...") write("Username: ") local username = read() write("Password: ") local password = read("*") rednet.send(password_server, username, true) senderId, message, distance = rednet.receive(5) if password == message then failed = false locker = false term.clear() term.setCursorPos(1,1) print("Welcome ", username) else print("Invalid Username or Password.") sleep(3) end else print("Command not recognised...") sleep(2) end end
RunasSudo-AWOLindefinitely 13 Jan 2013
Odd, there doesn't seem to be any problem in line 27.
senderId, message, distance = rednet.receive(5)Where are you calling this program? Is this the "startup" program, or is this in some other program you are running?
Pricey123 13 Jan 2013
RunasSudo, on 13 January 2013 - 01:56 PM, said:
Odd, there doesn't seem to be any problem in line 27.
senderId, message, distance = rednet.receive(5)Where are you calling this program? Is this the "startup" program, or is this in some other program you are running?
crazyguymgd 13 Jan 2013
Well I ran your program without any errors so I'm not too sure why you would be having a problem.
And I just spent a little while trying to force the error with no luck so something else you are doing must be wrong.
Sorry I couldn't find the problem, just letting you know I tried.
And I just spent a little while trying to force the error with no luck so something else you are doing must be wrong.
Sorry I couldn't find the problem, just letting you know I tried.
Pricey123 14 Jan 2013
crazyguymgd, on 13 January 2013 - 09:14 PM, said:
Well I ran your program without any errors so I'm not too sure why you would be having a problem.
And I just spent a little while trying to force the error with no luck so something else you are doing must be wrong.
Sorry I couldn't find the problem, just letting you know I tried.
And I just spent a little while trying to force the error with no luck so something else you are doing must be wrong.
Sorry I couldn't find the problem, just letting you know I tried.
because i am using tekkit and im not sure whether it is to be used on a updated version
Lyqyd 15 Jan 2013
Did you retype the program here or copy and paste it? Be sure the actual program has rednet.receive and not rednet.recieve.
remiX 15 Jan 2013
Pricey123 15 Jan 2013
crazyguymgd 15 Jan 2013
So you retyped the whole program to put it on here? Interesting... well glad it's fixed.
Pricey123 15 Jan 2013
But now each time i type in the correct username and passwords it comes up with Invalid Username Or Password? have i done something wrong in the other code?
http://www.computerc...pt-to-call-nil/
http://www.computerc...pt-to-call-nil/
ChunLing 15 Jan 2013
Have this program (and the other one) print out what they're sending and receiving, so that you can confirm that they match up and so forth.