Help with these warnings please - 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: Help with these warnings please (
/showthread.php?tid=567161)
Help with these warnings please -
Pewds - 11.03.2015
The warnings I get(All of them the same type, 3 lines):
Код:
Warning 219: local variable "time" shadows a variable at a preceding level
Warning 219: local variable "time" shadows a variable at a preceding level
Warning 219: local variable "time" shadows a variable at a preceding level
The warning places of the first 2 warnings:
Код:
if(Map[EvacType] == 3)
{
SetPlayerPos(playerid,285.5,2510.30004882817,121.5);
SetPlayerInterior(playerid,0);
format(string,sizeof(string), ""chat""COL_LIGHTBLUE" %s made it to the helicopter evacuation point and has received 1 coin!",PlayerName(playerid));
SendClientMessageToAll(-1,string);
DisablePlayerCheckpoint(playerid);
CurePlayer(playerid);
GivePlayerXP(playerid,50);
pInfo[playerid][pEvac]++;
pInfo[playerid][pCoins]++;
SetPlayerColor(playerid,COLOR_YELLOW);
}
The warning lines for first 2 warnings:
1st:
Код:
SendClientMessageToAll(-1,string);
2nd:
Код:
pInfo[playerid][pCoins]++;
For the third one:
Код:
if(GetDistanceBetweenPlayers(playerid,i) < 5.0)
{
GetClosestPlayer(i);
ApplyAnimation(i, "PED", "BIKE_fall_off", 4.1, 0, 1, 1, 1, 0, 1);
GameTextForPlayer(i,"~n~~n~~n~~n~~g~Screamer Attacked",3500,5);
SetTimerEx("ScreamerClearAnim",1500,0,"i",i);
GivePlayerXP(playerid,15);
Abilitys[playerid][ScreamerZombieAb] = gettime();
Warning line for it for the 3rd warning:
Код:
GivePlayerXP(playerid,15);
AW: Help with these warnings please -
Kaliber - 11.03.2015
Are you sure, that the source of these Warnings is your GM?
Re: Help with these warnings please -
CalvinC - 11.03.2015
Im pretty sure those are in an include, look at the directory to the left of the warning.
You probably have a global time variable somewhere that inteferes with the include, which you can simply fix by renaming it to something else.