if(A.health <= 0)
world<<"[B] has won against [A]!"
B.loc=locate(104,90,1)
B.safe = 1
A.tourny = 0
A.loc=locate(44,186,1)
Tournament_AI()
Entries.Remove(A)//HERE
return
proc
Tournament_AI()
if(Entries.len==1)
Tournament = 0
world<<"<center><B>Tournament over, winner is:<center></b>"
for(var/mob/K in Entries)
world<<"<center><b>[K]</center></b>"
alert("You win 5 Minutes of GM Training!")
K.loc=locate(47,44,1)
spawn(3000)
K.loc=locate(44,186,1)
K<<"<center><b> Staff: Times Up</center></b>"
Entries.Remove(K)
for(var/mob/M in world)
if(M.client)
M.verbs-=typesof(/mob/tournyverb/verb)
M.tourny=0
return
doit
for(var/mob/M in world)
if(M.tourny)
var/A=pick(Entries)
var/B=pick(Entries)
Problem description: Well, The code is meant to be an Automatic Tournament System. It works Relatively fine BUT the one problem with it is that When it goes to the part of the code to pick the winner when there is only one person Left in the list it doesn't pick a winner instead it picks another fight. My belief is the problem lies within the line of Entries.Remove(A) and it doesn't remove A. The line its at is marked by // Here. The Question is, Why doesn't it seem to be working? Thanks for your time Reading this