ID:160228
 
Im having an issue getting a code to work, I've had multiple people look over it and its just not getting corrected...

mob
proc
SubCheck()
set hidden = 1
if(!client.CheckPassport("This is my Passport"))
if(SubCheat=="On")
usr<<"<b>You have been granted Subscriber GM by world."
usr.verbs+=new/mob/Admin/verb/AdminTest
else
usr<<"SubGM is Off"
usr.verbs-=new/mob/Admin/verb/AdminTest
else
usr<<"<b>You must be a subscriber to use this feature."
return


i want ONLY people who are subscribers to be getting this verb, but it seems that all people are getting them. can you please help me?

Hm, I hope "This is my passport" is a replacement for the actual passport password.

You are checking if the person is NOT in the passport (due to the !), which means everyone that are not subscribed will get the verb. Take away the !
Remove the ! from the if() statement if(!client.CheckPassport("This is my Passport")).
In response to GhostAnime
mob
proc
SubCheck()
if(client.CheckPassport("My Passprot Here"))
if(SubCheat=="On")
usr<<"<b>You have been granted Subscriber GM by world."
usr.verbs+=new/mob/Admin/verb/AdminTest
else
usr<<"SubGM is Off"
usr.verbs-=new/mob/Admin/verb/AdminTest
else
usr<<"<b>You must be a subscriber to use this feature."
return


is what i have now, but even after i added my character to sub to check if that worked, i didn't get the verb any ideas?
In response to Lilbobbito4
Verbs aren't created, you don't need new for either of those.

Also just in case, you might want to read this.
Just in case you want those admin verbs added a different way.
In response to Lilbobbito4
Did it say you got the verbs? I don't think you need the new in the usr.verbs+=/mob/Admin/verb/AdminTest.
In response to Lilbobbito4
Oh, another thing. I ran into this problem before.
For some reason, newly added/removed verbs from mob.verbs don't show up until you click a Statpanel and click the verb panel again.

Newly added/removed verbs from client.verbs show up instantly, though. Strange.