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
ID:266319
Dec 23 2001, 11:13 am (Edited on Dec 23 2001, 11:31 am)
|
|
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: nope. doesn't |
<font color=pink>
i think it should be this:
usr.client.mob = /new/mob/DM()
not sure though</font>
.