undefined symbol and symbol is assigned a value that is never used
#1

Hello and thanks for reading my help topic! i need help with this:

pawn Code:
forward FinishGame();
public FinishGame()
{
   if(teamTickets[0] > teamTickets[1])
   {
       winnerState = 1;
   }
   else if(teamTickets[0] < teamTickets[1])
   {
      winnerState = 2;
   }
   else winnerState = 0;
   new winning_Team = (( (winningState == 2) &&(winningState != 0)) ? 3 : 2);
   for(new i = 0; i < MAX_PLAYERS; i++)
   {
       if(IsPlayerConnected(i))
       {
           if(winnerState) {
           //Show a textdraw that winning_Team has won!
           }
           else {
           //Show a textdraw that it's a tie
           }
       }
   }
}
These are the errors i get:

C:\Users\Henk\Desktop\Battlefield\gamemodes\battle field.pwn(6965) : error 017: undefined symbol "winningState"
C:\Users\Henk\Desktop\Battlefield\gamemodes\battle field.pwn(6965) : warning 204: symbol is assigned a value that is never used: "winning_Team"
Reply
#2

Try to change
pawn Code:
new winning_Team = (( (winningState == 2) &&(winningState != 0)) ? 3 : 2);
to
pawn Code:
new winning_Team = (( (winnerState == 2) &&(winnerState != 0)) ? 3 : 2);
and, the second errors mean, variable winning_Team is never used, try to use it.
Reply
#3

Thanks that helped!i fixed it!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)