ID:145473
 
I make an if statement and it says missing expression.
I want to make myself an admin so I use,
        if(usr.key = "SJRDOZER")
//...


What am I doing wrong? I have a gut feeling that it's something small and I learned it before... :\
In a If command, if you want something to test if it is equal to something else, you use == ...
SJRDOZER wrote:
I make an if statement and it says missing expression.
I want to make myself an admin so I use,
>       if(usr.key = "SJRDOZER")
> //...
>

</dm>
if(usr.key) doesn't have a missing expression but the if after it does.
What am I doing wrong? I have a gut feeling that it's something small and I learned it before... :\

it does have a missing expression =P. it should be if(usr.key=="SJRDOZER").

O-matic
In response to O-matic
That's messed. Sometimes I do = for a number variable and it works.

EDIT: I was mistaken woops
In response to SJRDOZER
It'd be better to keep a list of administrators.