It says variable isn't used, although it is.
#1

Basically I have set up this variable to tell the script if the game has been started or not

PHP код:
new game=0
0 being game hasn't started
1 game has been started

PHP код:
    if(incc[playerid] == 1)
    {
        if (
copsjoined == 0)
        {
            [
B]game 0;[/B]  //<--- This is the line that is giving me problems
        
}
        else
        {
        
copsjoined--;
        new 
death[128];
        
format(deathsizeof(death), "%s was killed on duty!"PlayerName);
        
SendClientMessageToAll(0xC93E3EFF,death);
        
incc[playerid] = 0;
        }
    }
       return 
1
This is where I am using the code and basically I am trying to say in English:

If the player is in the mini game

IF THE amount of cops left minus one is equal to 0

then end the game (set the game variable to 0)

else

Take a away amount of cops left
Say that the cop has died
The user is set to not being in the game


The error that I am getting:


warning 204: symbol is assigned a value that is never used: "game"



I really want to get into scripting and pawn is my starting area, I really appreciated your help as you are helping me do something I am actually interested in


EDIT: +Rep for all help
Reply


Messages In This Thread
It says variable isn't used, although it is. - by Dinoo - 27.03.2016, 16:04
Re: It says variable isn't used, although it is. - by Konstantinos - 27.03.2016, 16:12
Re: It says variable isn't used, although it is. - by Dinoo - 27.03.2016, 16:32
Re: It says variable isn't used, although it is. - by SickAttack - 27.03.2016, 16:53
Re: It says variable isn't used, although it is. - by Dinoo - 27.03.2016, 17:20
Re: It says variable isn't used, although it is. - by SickAttack - 27.03.2016, 17:27

Forum Jump:


Users browsing this thread: 1 Guest(s)