Code: Select all
init()
{
.......
level thread huntersAlive();
}Code: Select all
huntersAlive()
{
        zAlive = NewHudElem();
        zAlive.x = 0;
        zAlive.y = 0;
        zAlive.elemtype = "OBJECTIVE";
        zAlive.alpha = 1;
        zAlive.fontscale = 1.6;
        zAlive.foreground = 1;
        zAlive.color = (1, 0.4, 0.4)
        level thread CountHunters(axis);// <--------- this should be inside the for(;;), but when it is here it indicated that the syntax is with this line
        
        for(;;)
        {
                wait 1;
              
                zAlive SetText("Hunters: " + a)
        }
}Code: Select all
CountHunters(team)
{
        a = 0;
        for(i = 0; i < level.players.size; i++)
                if(level.players[i].pers["team"] == team)
                        a++;
        return a;
}Any help would be appreciated!

 
														


 
														
