ID:164343
![]() Jun 24 2007, 10:39 am
|
|
How would I start a code were a key can get special verbs like admin but just that start (the key when it logs in)
|
![]() Jun 24 2007, 11:45 am
|
|
It'd be better to stick the people who are 'GMs' in a list. That way you can add to it during play.
|
Star Club Productions wrote:
> if(src.key == "key here"||"key here") Wrong. That won't do what you may read it out in your mind. That if statement won't check if the player's key is the first key or the second key, but it will check if the first condition (if the player's key is the first key) is true, and if the second key is true. A text string is always going to be true, since it is a true value, thus the player gets administration verbs every time he or she logs in. To fix this, you need to use the comparison operator every single time instead of thinking that code reads out like English. if(src.key == "key1" || src.key == "key2") |