SA-MP Forums Archive
wth? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: wth? (/showthread.php?tid=277534)



wth? - marrcko - 18.08.2011

Hi i don't get why i get this warning

pawn Код:
C:\Users\Marius\Documents\samp\lfree roam\gamemodes\freeroam.pwn(5171) : warning 204: symbol is assigned a value that is never used: "IsNPCInRace"
pawn Код:
public NPCPOS()
    {
    for(new p=0; p<MAX_PLAYERS; p++)
        {
        new names[26];
        GetPlayerName(p,names,sizeof(names));
        if(!strcmp(names,"NPC_Racer"))
            {
            if(PlayerToPoint(6,p,-1735.4344,-580.2195,16.0630) ||
               PlayerToPoint(6,p,-1747.3632,312.3948,6.7599) ||
               PlayerToPoint(6,p,-2809.6226,294.4769,6.7585) ||
               PlayerToPoint(6,p,-2720.9036,708.1148,40.8252) ||
               PlayerToPoint(6,p,-2673.7502,1374.8865,55.1533))
                {
                IsNPCWinner=true;
                Kick(p);
                ConnectNPC("NPC_Racer","steady");
                KillTimer(Timer_RacePos);
                IsNPCInRace=false; // this line
                }
            }
        }
    }
it is global:
pawn Код:
bool:IsNPCInRace=false;
there is also and other lines with 'IsNPCInRace' @ false or true but only this line get warning. Why?


Re: wth? - sleepysnowflake - 18.08.2011

new bool:IsNPCInRace;

Somewhere .... IsNPCInRace = false;

Maybe under OnGameModeInit. Rest, you leave the same.


Re: wth? - marrcko - 18.08.2011

Still same s**t


Re: wth? - marrcko - 18.08.2011

Thx ******