Send_Invites()
for(var/mob/M in world)
var/mob/M
if(CustAlert(M,"A tournament has been started, would you like to join?",list("Join","Cancel"),0,10,5,12))
if("Join")
if(Tournament==0)
M<<"There isn't a tournament going on!"
else
Entries.Add(M)
M.tourny=1
M<<"You entered the tournament!"
world<<"<B><font color=red>Announcement:</font>[M] has joined the tournament!</b>"
M.loc=locate(186,18,13)
M.STM=M.MaxSTM
if("Cancel")
M<<"Ok, maybe you can join next time!"
return
Problem description:
What i'm trying to do is make it to where it sends everyone who is in the game that alert to ask them if they would want to join the tournament or not. I can get it to send, but A/ it sends it to the last person who logs in, and B/ if they press cancel, it ends the entire string, meaning that noone else gets the alert, if they do however press Join, then it sends it to the next person so please help me out... after i get this fixed i will have a fully working tournament system
Based upon the current code, you need to tab everything under for(var/mob/M in world) over once and var/mob/M is not needed.
It sounds like CustAlert() holds everything up. Add a spawn() to allow the for() loop to continue. Something similar to the following: