Jump to content




password program help


  • You cannot reply to this topic
4 replies to this topic

#1 sovani

  • New Members
  • 2 posts

Posted 30 October 2012 - 03:13 PM

I'm trying to write a password program and it just won't work
correctPassword = "shadow"
write ("please enter password:")
password = read()
If password == correctPassword Then
	  print("correct!")
	  redstone.setOutput("left", true)
	  sleep(5)
	  os.shutdown
else
	  print("incorrect")
	  sleep(5)
	  os.shutdown
end

I am getting a '=' expected error on line 4 (the if statement line). I tried searching for various fixes but nothing seemed to work. Any help would be appreciated :P/>

#2 Doyle3694

  • Members
  • 815 posts

Posted 30 October 2012 - 03:18 PM

if with non capital i. then with non capital t

#3 Doyle3694

  • Members
  • 815 posts

Posted 30 October 2012 - 03:19 PM

btw, it's
 os.shutdown()


#4 sovani

  • New Members
  • 2 posts

Posted 30 October 2012 - 03:29 PM

thanks that did the trick

#5 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 30 October 2012 - 05:09 PM

LUA is very case-sensitive :/





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users