ID:1533578
 
(See the best response by Ss4toby.)
Code:
mob
verb
Invite(mob/M in world)
switch(alert(M,"Would you like to join [src]'s crew?","Crew Invite")in list("Yes","No"))

if("Yes")
M.crew = src.crew
if("No")
return


Problem description:Trying to create a verb to invite someone to a party, so to speak. This is what I have so far, and right now, it's not popping up. Any help?

Best response
You are actually using alert() incorrectly, took me a moment to notice this.

switch(alert(M,"Would you like to join [src]'s crew?","Crew Invite","Yes","No"))
if("Yes")
src<<"[M] has accepted!"


That should fix your problem. As a heads up, you will want to add checks to make sure they are not in the group, or the group hasn't filled once the player accepts. Also, I wouldn't save that variable if I were you. Saving MOBs causes savefiles to become corrupted.
Toby is back :o sorry for the irrelevance haha
In response to Ss4toby
Also note that switch() isn't necessary for alert()s (and input()s) with only two options. A simple if/else (just if() in this case) would do fine.
if("Yes" == alert(M, "message", "title", "Yes", "No"))
src << "blah blah"