if(usr.key == "Lightning_Baby_Zero"||"Kasumi Tomonari")
usr.GameAdmin = 1
else
usr<<"Only game administer are allowed to enter the testing! You may stay, but you will go into a alpha testing room."
usr.loc = locate(5,5,1)
When people login, it makes all of them administers... even the people that arnt in the list..
ID:268116
Mar 17 2004, 1:51 pm
|
|
Kasumi Tomonari wrote:
if(usr.key == "Lightning_Baby_Zero"||"Kasumi Tomonari") You're checking if(usr.key == "Lightning_Baby_Zero") as well as checking if("Kasumi Tomonari"). Since Kasumi Tomonari is string with content, it will always return true. What you want is if(usr.key == "Lightning_Baby_Zero" || usr.key == "Kasumi Tomonari") |
In response to SSJ4_Gohan_Majin
|
|
mob/Login() |
In response to Jon88
|
|
Jon88 wrote:
What you want is if(usr.key == "Lightning_Baby_Zero" || usr.key == "Kasumi Tomonari") Even better: if (src.key in list("Lightning_Baby_Zero","Kasumi Tomonari")) And even better than that, create a separate hub entry for game admins. Call it whatever you want, MyGameAdmins or anything. Set it up under distribution by invitation only. Make a note of the passport string it gives you, and then use the following in your game code: if (src.client.CheckPassport("yourpassportstringhere")) With this method, you never have to recompile your game to add or remove admins. Just go to the distribution tab of that hub entry and add/subtract people. Much, much cleaner, especially after you start to distribute it! |
In response to Kasumi Tomonari
|
|
Kasumi Tomonari wrote:
> mob/Login() Revised code above. [Edit] Or, you can do it this way. var/list/admins = list("Lightning_Baby_Zero","Kasumi Tomonari") It's much easier, just add "key". It's pretty hard to get a bug that way. --SSJ4_Gohan_Majin |
Is that the whole Login() code? If not, give us the whole.
And please, use
While posting a code on the forum.
--SSJ4_Gohan_Majin