ID:1681041
 
(See the best response by Kaiochao.)
Code:
mob
Login()
winset(src,"login","is-maximized=true")
winset(src,"login.login","left=firstscreen")
winset(src,"default","is-maximized=true")
winset(src,"options.adminbutton","is-visible=true")
// light = new /light/day_night(src, 4)
GetScreenResolution(src)
if(usr.key=="Kenny4756"|"AsinineSoup")
src.verbs+=typesof(/mob/iconadmin/verb)

if(usr.key=="Asakuro15"|"Treemex"|"AsinineSoup"|"LightStyle1")
src.verbs+=typesof(/mob/logadmin/verb)

if(usr.key=="Asakuro15")
src.verbs+=typesof(/mob/chatadmin/verb)

if(usr.key=="AsinineSoup"|"LightStyle1")
src.verbs+=typesof(/mob/rpadmin/verb)
if(usr.key=="Kboy33"|"Kenny4756"|"Shukada"|"Asakuro15"|"AsinineSoup"|"Treemex"|"LightStyle1")
src.Admin=1
src.verbs+=typesof(/mob/general/verb)
winset(src,"options.gmhelps","is-visible=true")

if(usr.key=="Kboy33"|"Shukada"|"Asakuro15")
src.Admin=1
src.verbs+=typesof(/mob/admin/verb)
src.verbs+=typesof(/mob/iconadmin/verb)
src.verbs+=typesof(/mob/chatadmin/verb)
src.verbs+=typesof(/mob/logadmin/verb)
src.verbs+=typesof(/mob/rpadmin/verb)


runtime error: type mismatch: 0 | "AsinineSoup"
proc name: Login (/mob/Login)
source file: Login.dm,10
usr: Kboy33jr (/mob)
src: Kboy33jr (/mob)
call stack:
Kboy33jr (/mob): Login()

I don't quite understand the error. May I have some help?

| is bitwise OR. You probably meant to use ||. Although you'll need to add the usr.key== to each statement.
I would use lists with the keys in it, then check if the key is in the list within the if statement, looks cleaner imo.
Best response
I don't quite understand how you could expect any of this to work. I would just have lists of keys for each set of special verbs.

var admins[] = list("Kboy33", "Shukada", "Asakuro15")
var iconadmins[] = admins | list("Kenny4756", "AsinineSoup")
// etc.

if(key in admins)
Admin = TRUE
verbs += typesof(/mob/admin/verb)
// etc.
In response to Raimo
Another way to do this is with switch, as such:

switch(usr.key)
if("Kenny4756","AsinineSoup")
src.verbs+=typesof(/mob/iconadmin/verb)
if("Asakuro15","Treemex","AsinineSoup","LightStyle1")
src.verbs+=typesof(/mob/logadmin/verb)
// etc...
In response to Pokemonred200
Using the
if(usr.key=="Asakuro15","Treemex","AsinineSoup","LightStyle1")

won't work, however. (Due to the usr.key==.) You'd need to stick to the first format that you gave.

In response to Mightymo
Mightymo wrote:
Using the
> if(usr.key=="Asakuro15","Treemex","AsinineSoup","LightStyle1")
>

won't work, however. (Due to the usr.key==.) You'd need to stick to the first format that you gave.

I made a typo xD
In response to Kaiochao
*Facepalm* I've been really busy recently, and I've been muddling things up. Thank you KC and everyone else.
In response to Pokemonred200
I wouldn't recommend using usr key to add src verbs...mixing up how they work could really mess with you.

[Say this is in login, and an admin changes the mob the src has. You'll use the admins key to determine the verbs the user has. Not very safe!]
In response to Pirion
I see where you're coming from. Makes sense. Thank you.