ID:143047
 
Code: Switch Alert Code
switch(alert("Would you like to play",,"Yes","No","Quit")) //All this code is in a proc
if("Yes")
world << "[src] is playing."
if("No")
world << "[src] is not playing."


Problem description: I get a warning
called "empty switch statement." Is there something wrong in my code?
You need to indent:
switch(X)
if(Y)
if(Z) // Do not have the following
else if (A)
else (B) // This will never happen. switch() will think that the 'else if' above is the last option because of the 'else' present in it...
In response to GhostAnime
Ah, thanks. Simple mistake.
In response to DadGun
No problem, sometimes the simplest thing can be the most difficult to find/think of.