10 posts
Posted 13 January 2013 - 12:32 PM
Im not to sure but i guess that this maybe something linked to another problem im having?
http://www.computercraft.info/forums2/index.php?/topic/8798-luaerror-startup2-attempt-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
235 posts
Location
/dev/earth1aus5
Posted 13 January 2013 - 01:56 PM
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?
10 posts
Posted 13 January 2013 - 08:40 PM
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?
I am using this as startup as i am trying to make a user interferance for my factory
139 posts
Location
USA
Posted 13 January 2013 - 09:14 PM
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.
10 posts
Posted 14 January 2013 - 01:02 AM
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.
Are you using tekkit?
because i am using tekkit and im not sure whether it is to be used on a updated version
139 posts
Location
USA
Posted 14 January 2013 - 11:27 AM
how old of a version of cc are you using in that tekkit pack?
10 posts
Posted 15 January 2013 - 07:09 AM
Tekkit uses version 1.33
8543 posts
Posted 15 January 2013 - 07:13 AM
Did you retype the program here or copy and paste it? Be sure the actual program has rednet.receive and not rednet.recieve.
2088 posts
Location
South Africa
Posted 15 January 2013 - 07:35 AM
Tekkit uses version 1.33
Download Tekkit lite :)/> It has CC 1.4+
10 posts
Posted 15 January 2013 - 07:35 AM
Did you retype the program here or copy and paste it? Be sure the actual program has rednet.receive and not rednet.recieve.
Hey thanks very much this seems to have fixed the error even on the other post.
Once again thanks
139 posts
Location
USA
Posted 15 January 2013 - 07:43 AM
So you retyped the whole program to put it on here? Interesting… well glad it's fixed.
10 posts
Posted 15 January 2013 - 07:56 AM
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.computercraft.info/forums2/index.php?/topic/8798-luaerror-startup2-attempt-to-call-nil/
2005 posts
Posted 15 January 2013 - 06:21 PM
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.