This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
BrettSmith21's profile picture

This is my post for help SO PLEASE HELP

Started by BrettSmith21, 28 June 2012 - 05:14 AM
BrettSmith21 #1
Posted 28 June 2012 - 07:14 AM
help what is wrong with my code??



Apass = "admin"   
   
    print "Password:"
    status, password = pcall (read,'*')
    if password == Apass then
	    print "Access Granted!"
	    sleep(2)
	    shell.run("cd","Admin")
	    shell.run("clear")
	    print("--Mine7 Admin--")
    else
	    print "Access Denied!"
	    sleep(2)
	    os.shutdown()
    end
Kolpa #2
Posted 28 June 2012 - 09:42 AM
1. of all reported wrong section post it in ask a pro
2. u dont have to use p call just do

Apass = "admin"  
  
    print "Password:"
    local password = read,'*'
    if password == Apass then
		    print "Access Granted!"
		    sleep(2)
		    shell.run("cd","Admin")
		    shell.run("clear")
		    print("--Mine7 Admin--")
    else
		    print "Access Denied!"
		    sleep(2)
		    os.shutdown()
    end