ID:168878
 
mob/verb/Away()
set desc="Let others know your not here."
set category="Options"
if(usr.away==1)
switch(alert("Your already away. What would you like to do?",,"Change Message","Return"))
if("Change Message")
var/message=input("Enter a new away message.")
if(!message)
usr.awymessage="No reason."
else
usr.awymessage="[message]"
if("Return")
usr.away=0
world << "\blue <b><i>[usr] has returned"
else
switch(alert("What would you like to do?",,"AFK","Return"))
if("AFK")
var/message=input("Enter an away message")
if(!message)
usr.awymessage="No reason."
else
usr.awymessage="[message]"
world << "\red <b><i>[usr] has gone away."
usr.away=1
if("Return")
usr << "Never mind....."
return


Ok heres the problem: This is my hand written away code, which took me overall 5 minutes. but i have errors. almost every line that has switch(alert on it gives me a warning: empty switch statement. Can someone tell me why this is, and patch any other problems this code might have as well? thanks in advance
rein
This goes in Code Problems.
You have to tab under your swithces..Also:
if(something == 1) //change to
If(Something)//this. It shows that its not equal to zero

if(soemthing == 0)//change to
if(!soemthing)//if something is zero


switch(input(
if(blah) //change to

switch
if(
In response to Popisfizzy
ok..and nevermind anyway. i just now noticed i dident indent under the switches. but if anyone spots naything else that could be fixed dont hesitate to post(and ill put this in the right palce next time)