Jump to content




[Lua][Error] startup:27: attempt to call nil

help lua

12 replies to this topic

#1 Pricey123

  • New Members
  • 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.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


#2 RunasSudo-AWOLindefinitely

  • Signature Abuser
  • 249 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?

#3 Pricey123

  • New Members
  • 10 posts

Posted 13 January 2013 - 08:40 PM

 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?
I am using this as startup as i am trying to make a user interferance for my factory

#4 crazyguymgd

  • Members
  • 139 posts
  • LocationUSA

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.

#5 Pricey123

  • New Members
  • 10 posts

Posted 14 January 2013 - 01:02 AM

 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.
Are you using tekkit?
because i am using tekkit and im not sure whether it is to be used on a updated version

#6 crazyguymgd

  • Members
  • 139 posts
  • LocationUSA

Posted 14 January 2013 - 11:27 AM

how old of a version of cc are you using in that tekkit pack?

#7 Pricey123

  • New Members
  • 10 posts

Posted 15 January 2013 - 07:09 AM

Tekkit uses version 1.33

#8 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 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.

#9 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 15 January 2013 - 07:35 AM

 Pricey123, on 15 January 2013 - 07:09 AM, said:

Tekkit uses version 1.33

Download Tekkit lite :) It has CC 1.4+

#10 Pricey123

  • New Members
  • 10 posts

Posted 15 January 2013 - 07:35 AM

 Lyqyd, on 15 January 2013 - 07:13 AM, said:

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

#11 crazyguymgd

  • Members
  • 139 posts
  • LocationUSA

Posted 15 January 2013 - 07:43 AM

So you retyped the whole program to put it on here? Interesting... well glad it's fixed.

#12 Pricey123

  • New Members
  • 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.computerc...pt-to-call-nil/

#13 ChunLing

  • Members
  • 2,027 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.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users