ID:141700
 
Code:Close Testing
mob
Login()
if(src.key=="Scarymonkeys623, Evilmaniac")
usr << "Welcome to Closed Testing."
else
world << "[src.key] has just tried to enter Closed Testing."
del(src)
..()


Problem description:I've been trying to make a closed testing code so i could test my game without other people coming on, but for some reason, every time I log in with this code, it says "Connection failed. World shutdown on: "

if(key=="Scarymonkeys623" || key == "Evilmaniac")


That's what you're looking for. Look up the || operator. And you want to compare the key with two text strings, being them the keys. Not one text string with the names of the two keys.

Also, no usr in proc.
In response to Andre-g1
Thanks dude, this has been bugging me all morning.
In response to Andre-g1
A list would be better, and less redundant.

var/list/testers = list("Person1","Person2","Person3","And so on")

mob/Login()
if(!(key in testers)) //if their key isn't in the testers list
del(src) //delete them
..()
In response to Jeff8500
Indeed, since I just focused on explaining to him why it was wrong, I forgot to mention that.

:)