ID:178654
 
if(usr.key = "CBM1","WizDragon","WxCherryxBombxW","Sariat","NightMare619", "The choosen one alena","Spudgun")

This is my code for my login. This is so only these people log in, but i get one error saying if: extra args. How would i get rid of this error?
Tazor07 wrote:
if(usr.key = "CBM1","WizDragon","WxCherryxBombxW","Sariat","NightMare619", "The choosen one alena","Spudgun")

This is my code for my login. This is so only these people log in, but i get one error saying if: extra args. How would i get rid of this error?

Thats because an if() doesn't do that many args, you need to use a list like this..

var/list/admins = list("me","you")
if(usr.key in admins)
Tazor07 wrote:
if(usr.key = "CBM1","WizDragon","WxCherryxBombxW","Sariat","NightMare619", "The choosen one alena","Spudgun")

This is my code for my login. This is so only these people log in, but i get one error saying if: extra args. How would i get rid of this error?

You've actually got two problems. Darkness explained one of them. Another problem is that you're using = instead of ==. Even though == won't work for you here and would be entirely nonsensical, == is the comparison operator and = is for assignment or for named arguments.

The reason the error message reads as it does is because it thinks you're calling a proc named if like this:
if_proc("CBM1","WizDragon","WxCherryxBombxW","Sariat","NightMare619","The choosen one alena","Spudgun")

I wrote that as if_proc() instead of if() to show you how the DM compiler is seeing it. It's seeing usr.key="CBM1" as a single argument, where usr.key would be the name of that argument, just like if you'd called a proc like this:
myproc(a=2,b=4)

Anyway, Darkness's answer will get you back on track, but basically I wanted to show you why you got the error message you did. Hopefully that will make it a little clearer in case you ever run into a similar situation.

Lummox JR
In response to Lummox JR
I see a == problem.

if(usr.key == "Blah")
//do stuff here


--SSJ4_Gohan_Majin