ID:144806
 
Code: if(locate(src.key) in Staff)
switch(alert("Is this a GM character?","GM char?","GM","Mortal"))
if("GM")
char.OM = 1


Problem description:i have a code in my game that checks the key of a person that is loging in to see if they are on the list that are designated gms, yet the notice that i have built in doesnt show up and the gms arent classified as gms nor do they have their abilities.

Remove the locate(), and if it's in a proc(oops, edit), change Usr in the alert() to src.
In response to DivineO'peanut
yeah..see i didnt make this game..simply im a coding noob so in simplier terms would be nice..ty
In response to DivineO'peanut
DivineO'peanut wrote:
Remove the locate(), and if it's in Login() or client/New(), change Usr in the alert() to src.

It's not. And also the reason I found is that the 'Staff' list became null for some reason. I need to go back and find out why.
In response to Tiptopfunnyman
mob/Login()
..()
if(Staff.Find(src.key))
if(alert(src,"Is this a GM character?","GM char?","GM","Mortal")=="GM")
src.OM=1
src.verbs+=typesof(/*directory to GM verbs here*/)
This is prolly what your looking for =/.