SA-MP Forums Archive
warning 208: function with tag result used before definition, forcing reparse - 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 208: function with tag result used before definition, forcing reparse (/showthread.php?tid=622674)



warning 208: function with tag result used before definition, forcing reparse - khanhbgpro - 25.11.2016

Help Me
warning:
Quote:

(149705) : warning 208: function with tag result used before definition, forcing reparse

Quote:

forward AntiNameTag();
public AntiNameTag()
{
foreach(Player,playerid)
{
foreach(Player,i)
{
if(i == playerid) continue;
if(GetPlayerDistanceFromPlayer(playerid, i) <= MAX_DISTANCIA)
{
ShowPlayerNameTagForPlayer(playerid,i,true);
}
else
{
ShowPlayerNameTagForPlayer(playerid,i,false);
}
}
}
}
Float:GetPlayerDistanceFromPlayer(playerid, targetid)
{
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
return GetPlayerDistanceFromPoint(targetid, Pos[0], Pos[1], Pos[2]);
}




Re: warning 208: function with tag result used before definition, forcing reparse - Konstantinos - 25.11.2016

After the includes, add:
pawn Код:
forward Float:GetPlayerDistanceFromPlayer(playerid, targetid);
Another way would be to move the function before the place is called.