ID:266319
 
I am making a D&D game system and I need help on the login part here ius the code:

mob
Login()
var/mob/M
for(M in world)
if(M.DM==1)
usr.loc=locate(1,1,1)
else
switch(input("Do you want to be a DM?","DM")in list("Yes","No"))
if("Yes")
usr.DM=1
usr.name="[usr] (GM)"
usr<<"You are a DM"
usr.loc=locate(1,1,1)
usr.client.mob = new /mob/DM
return 0
if("No")
usr.loc=locate(1,1,1)
return 0


the red part makes it keep popping up the switch message. need help please.
Thanks,
Air _King


-Edit-
sorry about the html it for some reason wont close so here is the piece that wont work:

usr.client.mob = new /mob/DM
Air _King wrote:
I am making a D&D game system and I need help on the login part here ius the code:

mob
Login()
var/mob/M
for(M in world)
if(M.DM==1)
usr.loc=locate(1,1,1)
else
switch(input("Do you want to be a DM?","DM")in list("Yes","No"))
if("Yes")
usr.DM=1
usr.name="[usr] (GM)"
usr<<"You are a <font color=red>DM"
usr.loc=locate(1,1,1)
<font color=red>usr.client.mob = new /mob/DM
</font> return 0
if("No")
usr.loc=locate(1,1,1)
return 0


the red part makes it keep popping up the switch message. need help please.
Thanks,
Air _King


-Edit-
sorry about the html it for some reason wont close so here is the piece that wont work:

usr.client.mob = new /mob/DM
<font color=pink>

i think it should be this:

usr.client.mob = /new/mob/DM()


not sure though</font>
.

Im not sure but I think you can remove the "return 0" text from the code. also change this:
if("No")
To this:
else if("No")

may probably help. Not entirely sure.
In response to Geo
Geo wrote:
Im not sure but I think you can remove the "return 0" text from the code. also change this:
if("No")
To this:
else if("No")

may probably help. Not entirely sure.

nope. doesn't