thanks
-Nitebomber51
The Ask a Pro forum isn't really for advertising your APIs, especially when they didn't ask for something like it.You can try my API. It is pretty useful for storing data for a long time. You can see it here :)/>/>
Hope you enjoy.
user = ("bob")
password = ("abc123")
write ("Enter Username: ")
local uname = read()
write ("Enter Password: ")
local passwd = read("*")
if uname == user and passwd == password then
do some stuff
else
print ("incorrect username or password entered try again")
end
thanks man so to add more users to that i would type inSomething simple to start with… Granted keep in mind the more users you have the more cluttered the script is going to be. So….you will really need to use some files to store the usernames/passwords in and check against that instead of what I'm going to do here. This is just something very basic to get you thinking….user = ("bob") password = ("abc123") write ("Enter Username: ") local uname = read() write ("Enter Password: ") local passwd = read("*") if uname == user and passwd == password then do some stuff else print ("incorrect username or password entered try again") end
This is in no way secure, ctrl + t will terminate it and give the user access to the system. Like I said just an example to get you started. Read the tutorials and check out some of the existing programs. Come back when you're having issues with your code..
user = ("bob")
user2 = ("bill")
password = ("abc123")
pass2= ("def456")
write ("Enter Username: ")
local uname = read()
write ("Enter Password: ")
local passwd = read("*")
if uname == user or user2 and passwd == password or pass2 then
do some stuff
else
print ("incorrect username or password entered try again")
end
or if not what would i type in?
if uname == user and passwd == password then
do some stuff
elseif uname == user2 and passwd == pass2 then
do the same stuff
else
print ("incorrect username or password entered try again")
end
The problem with that is if there was a user bob and another user joe and Bob's pass was water and Joe's was dollar I could enter bob for user and dollar as pass even though that isn't a valid combination.thanks man so to add more users to that i would type inSomething simple to start with… Granted keep in mind the more users you have the more cluttered the script is going to be. So….you will really need to use some files to store the usernames/passwords in and check against that instead of what I'm going to do here. This is just something very basic to get you thinking….user = ("bob") password = ("abc123") write ("Enter Username: ") local uname = read() write ("Enter Password: ") local passwd = read("*") if uname == user and passwd == password then do some stuff else print ("incorrect username or password entered try again") end
This is in no way secure, ctrl + t will terminate it and give the user access to the system. Like I said just an example to get you started. Read the tutorials and check out some of the existing programs. Come back when you're having issues with your code..or if not what would i type in?user = ("bob") user2 = ("bill") password = ("abc123") pass2= ("def456") write ("Enter Username: ") local uname = read() write ("Enter Password: ") local passwd = read("*") if uname == user or user2 and passwd == password or pass2 then do some stuff else print ("incorrect username or password entered try again") end
-nitebomber51
Hmmm this is more complex than i thought. this is going to need more of my time…The problem with that is if there was a user bob and another user joe and Bob's pass was water and Joe's was dollar I could enter bob for user and dollar as pass even though that isn't a valid combination.thanks man so to add more users to that i would type inSomething simple to start with… Granted keep in mind the more users you have the more cluttered the script is going to be. So….you will really need to use some files to store the usernames/passwords in and check against that instead of what I'm going to do here. This is just something very basic to get you thinking….user = ("bob") password = ("abc123") write ("Enter Username: ") local uname = read() write ("Enter Password: ") local passwd = read("*") if uname == user and passwd == password then do some stuff else print ("incorrect username or password entered try again") end
This is in no way secure, ctrl + t will terminate it and give the user access to the system. Like I said just an example to get you started. Read the tutorials and check out some of the existing programs. Come back when you're having issues with your code..or if not what would i type in?user = ("bob") user2 = ("bill") password = ("abc123") pass2= ("def456") write ("Enter Username: ") local uname = read() write ("Enter Password: ") local passwd = read("*") if uname == user or user2 and passwd == password or pass2 then do some stuff else print ("incorrect username or password entered try again") end
-nitebomber51
edvert i'm thankful for your input but i already looked at the sorce of redworks and cant find anything which is why i posted here i would like the code to analyze and see how it works so if anyone can do that thanks