warning variable. - 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)
+--- Thread: warning variable. (
/showthread.php?tid=556492)
warning variable. -
sn0p - 10.01.2015
Код:
for(new playerid=0;playerid<MAX_PLAYERS;playerid++)
{
if(IsPlayerInRangeOfPoint(playerid, 15, -689.9234,967.5347,12.1804))
{
GameTextForPlayer(playerid, "~g~Vartai valdomi ~n~~r~60sec", 2000, 5);
}
warning 219: local variable "playerid" shadows a variable at a preceding level
Respuesta: warning variable. -
JuanStone - 10.01.2015
Change
pawn Код:
for(new i = 0; i <MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i, 15, -689.9234,967.5347,12.1804))
{
GameTextForPlayer(i, "~g~Vartai valdomi ~n~~r~60sec", 2000, 5);
}
Re: warning variable. -
bgedition - 10.01.2015
change playerid with other variable.
Re: Respuesta: warning variable. -
sn0p - 10.01.2015
Quote:
Originally Posted by JuanStone
Change
pawn Код:
for(new i = 0; i <MAX_PLAYERS; i++) { if(IsPlayerInRangeOfPoint(i, 15, -689.9234,967.5347,12.1804)) { GameTextForPlayer(i, "~g~Vartai valdomi ~n~~r~60sec", 2000, 5); }
|
Had tried dosnt workt
Re: warning variable. -
bgedition - 10.01.2015
just remove this:
pawn Код:
for(new playerid = 0; playerid <MAX_PLAYERS; playerid++)