ID:142363
 
Code:
var/list/GLOBAL_ADMINS = list("Matt3151")

client/New()
..()
src<<"Passed."
if(GLOBAL_ADMINS.Find(src.key))
src<<"Got Admin."
verbs+=new /mob/Admin/verb/Jutsu
src<<"Got Jutsu."
verbs += typesof(/mob/Admin/verb)
src<<"Final Passed."


Problem description:

Well...The problem happens when ever I try and add Verbs, with the typesof command, I can add them singly, however, when it comes to the Admin Verbs, it just stops there,
I will get 3 Messages, Passed., Got Admin., and then Got Jutsu., and then it will just stop there.

So if you could help, or tell me if you guys get this problem, that would be very Helpfull!

var/list/GLOBAL_ADMINS = list("Devourer Of Souls")

mob
Admin
verb
Cheese()
Doodle()
Jutsu()

client/New()
..()
src<<"Passed."
if(GLOBAL_ADMINS.Find(src.key))
src<<"Got Admin."
verbs+=new /mob/Admin/verb/Jutsu
src<<"Got Jutsu."
verbs += typesof(/mob/Admin/verb)
src<<"Final Passed."


This worked fine for me. Even taking out all other Admin verbs except Jutsu didn't make it stop before "Final Passed". There's a few bad practices in this little snippet, so I'm going to try and show you a better way:

client/New()
..()
if(key in GLOBAL_ADMINS) // in operator searches the list for the client's key. Find gets the exact position and is unnecessary.
verbs += typesof(/mob/Admin/verb) // If it finds it, it adds every kind of Admin verb.


EDIT: As mentioned by Popisfizzy, you'd be even better off by changing all of these to client verbs. (Probably something I should've accounted for myself, but ah well.)

It's no harder to do than the current method, fortunately.

client
Admin
verb
Cheese()
Doodle()
Jutsu()

client/New()
..()
if(key in GLOBAL_ADMINS)
verbs += typesof(/client/Admin/verb)


In response to Devourer Of Souls
He should be making all the verbs /client verbs and adding them to the client instead.
In response to Popisfizzy
That's actually not a bad point.
In response to Devourer Of Souls
I understand that yes, I should have changed all the Verbs to be set on the Client, however, that isnt the problem :/
What Im kinda asking has anyone had this problem before?
what COULD cause this problem, and things such as that
In response to Devourer Of Souls
        verbs+=new /mob/Admin/verb/Jutsu
src<<"Got Jutsu."
verbs += typesof(/mob/Admin/verb)


I don't think you need to 'create' a new verb - get rid of the new proc in there.

Also, you're giving them Jutsu which is a type of /mob/Admin/verb/ anyways, so that seems a bit useless.
In response to Nickr5
Think you might of replied to the wrong post.
In response to Devourer Of Souls
Oops, must've clicked the wrong button