ID:264774
 
Code:
mob
verb
GuildInvite(mob/characters/G in world)
set category="Guild"
if(G.inguild==0)
if(usr.gowner==1||usr.gcaptain==1||usr.gleader==1)
alert(G,"[usr] has invited you to join is guild [usr.guild].Do you wish to accept his invatation","Approve","Deny")
if("Approve")
world<<"<fontcolor=yellow>[G] has just joined [usr.guild]</font>"
G.inguild=1
G.guild=usr.guild
G.guildrank=Member
if("Deny")
usr<<"[G] has just denied your invatation"
sleep(50)
else
return
else
usr<<"[G] already has a guild"


Problem description:
I want to invite G to my guild but i cant do that with alert what are my other options.I dont know how to do this with switch either being that it only goes to the usr not G.

Guild.dm:70:error: proc definition not allowed inside another proc
Guild.dm:86:error: unbalanced }
Hit F1 for help on alert and switch.
        Battle_Player(mob/Trainer/M as mob in world)
switch(alert(M,"[src] wants to battle you. Are you upto the fight?","Battle request.","Yes","No"))
if("Yes")
alert(src,"[M] accepted the Challenge.")
alert(M,"[src] is picking battle music.")
switch(input("Pick your battle music.")in list("none"))
if("none")
src<<""
src.loc=locate(63,21,1)
M.loc=locate(63,21,1)
if("No")
alert(usr,"[M] declines the Challenge.")