ID:142923
 
Code:
mob
Login()
if(usr.key=="GohanIdz")
usr.gm=4
else if(usr.key=="Uchiha Brendan")
usr.gm=3
else if(usr.key=="ItsukeUchiha"||"Drakenking"||"Dexii")
usr.gm=1
else
usr.gm=0
if(usr.gm==4)
usr.verbs+=typesof(/mob/Admin/verb)
usr.verbs+=typesof(/mob/GM3/verb)
usr.verbs+=typesof(/mob/GM2/verb)
usr.verbs+=typesof(/mob/GM1/verb)
else if(usr.gm==3)
usr.verbs+=typesof(/mob/GM3/verb)
usr.verbs+=typesof(/mob/GM2/verb)
usr.verbs+=typesof(/mob/GM1/verb)
else if(usr.gm==2)
usr.verbs+=typesof(/mob/GM2/verb)
usr.verbs+=typesof(/mob/GM1/verb)
else if(usr.gm==1)
usr.verbs+=typesof(/mob/GM1/verb)
:load
switch(input("What do you wish to do?", "New/Load/Delete", text) in list("New","Load","Delete"))
if("New")
:pickname
var/charactername = input("What Is Your Name?","Name") as text|null
if(length(charactername) <2)
alert("Your name must be longer!")
goto pickname
if(length(charactername) > 20)
alert("Your name can not be longer then 20 letters!")
goto pickname
usr.name="[html_encode(charactername)]"
switch(input("Choose your destiny.", "Destiny", text) in list("Good","Evil"))
if("Good")
usr.alignment="Good"
if("Evil")
usr.alignment="Evil"

usr.race="Human"
usr.icon='newBase.dmi'
world<<"<font color=blue>[usr] has created a new character."
usr<<"<b><font color=aqua><center>Message from Div<br><br>This is purely a test of things that are<br>in the game. Gameplay isn't really what<br>we're worried about. Bugs are. If you find<br> any, please report it."
usr.loc=locate(4,90,4)
usr.AutoSave()


Problem description:

Unfortunately, it's now making everyone GM 1 for some odd reason. Anyone have any idea how to fix it?
mob
Login()
if(usr.key=="GohanIdz")
usr.gm=4
usr.verbs+=typesof(/mob/Admin/verb)
usr.verbs+=typesof(/mob/GM3/verb)
usr.verbs+=typesof(/mob/GM2/verb)
usr.verbs+=typesof(/mob/GM1/verb)
if(usr.key=="Uchiha Brendan")
usr.gm=3
usr.verbs+=typesof(/mob/GM3/verb)
usr.verbs+=typesof(/mob/GM2/verb)
usr.verbs+=typesof(/mob/GM1/verb)
if(usr.key=="ItsukeUchiha"||"Drakenking"||"Dexii")
usr.gm=1
usr.verbs+=typesof(/mob/GM1/verb)
:load
switch(input("What do you wish to do?", "New/Load/Delete", text) in list("New","Load","Delete"))
if("New")
:pickname
var/charactername = input("What Is Your Name?","Name") as text|null
if(length(charactername) <2)
alert("Your name must be longer!")
goto pickname
if(length(charactername) > 20)
alert("Your name can not be longer then 20 letters!")
goto pickname
usr.name="[html_encode(charactername)]"
switch(input("Choose your destiny.", "Destiny", text) in list("Good","Evil"))
if("Good")
usr.alignment="Good"
if("Evil")
usr.alignment="Evil"

usr.race="Human"
usr.icon='newBase.dmi'
world<<"<font color=blue>[usr] has created a new character."
usr<<"<b><font color=aqua><center>Message from Div<br><br>This is purely a test of things that are<br>in the game. Gameplay isn't really what<br>we're worried about. Bugs are. If you find<br> any, please report it."
usr.loc=locate(4,90,4)
usr.AutoSave()



try that and tell me if it works

...:::Pirata Inmortal:::...
In response to Pirata Inmortal
Nope, still not working.
In response to GohanIdz
then go to where you coded GM as a var and put GM = 0
In response to Pirata Inmortal
It was already like that.
In response to GohanIdz
Nevermind, I figured it out. Thanks anyway.
In response to GohanIdz
GohanIdz wrote:
Nevermind, I figured it out. Thanks anyway.

Im just wondering but can you give a code for it since you found out?
In response to BumBum007
BumBum007 wrote:
Im just wondering but can you give a code for it since you found out?

The problem was in one of his if statements. When checking multiple keys he accidentally checked if the name was a true value instead of checking if it matched the players key.

if(key=="YMIHere"||"BumBum007")
// Incorrect, "BumBum007" by itself is a TRUE value. FALSE values are 0, null, and "".

if(key=="YMIHere"||key=="BumBum007")
// Correct, only you and I pass this condition.