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=600532)
warning 208: function with tag result used before definition, forcing reparse -
warriorfrog - 09.02.2016
Help-me to fix it!
Error line:
bool:IsPlayerAimingAtPlayer(playerid, target)
Error
warning 208: function with tag result used before definition, forcing reparse
Код:
bool:IsPlayerAimingAtPlayer(playerid, target) // warning 208: function with tag result used before definition, forcing reparse
{
new Float:x, Float:y, Float:z;
GetPlayerPos(target, x, y, z);
if (IsPlayerAimingAt(playerid, x, y, z-0.75, 0.25)) return true;
if (IsPlayerAimingAt(playerid, x, y, z-0.25, 0.25)) return true;
if (IsPlayerAimingAt(playerid, x, y, z+0.25, 0.25)) return true;
if (IsPlayerAimingAt(playerid, x, y, z+0.75, 0.25)) return true;
return false;
}
Re: warning 208: function with tag result used before definition, forcing reparse -
Kyle - 09.02.2016
It means that you access/use the function before it's defined.
I would move the whole function to the top of the script, or before the line where you call the function.
Re: warning 208: function with tag result used before definition, forcing reparse -
ikey07 - 09.02.2016
dont use bool for such functions, there is no need for it.
Re: warning 208: function with tag result used before definition, forcing reparse -
Vince - 09.02.2016
Tags are significantly underused. If applied well then a tag mismatch warning will easily alert you to any mistakes you have made while typing your code.
But yeah, you can either move it to the top of the script (or put it in an include), or you can forward the function (same way you would do a public function) and put it anywhere.
Re: warning 208: function with tag result used before definition, forcing reparse -
warriorfrog - 09.02.2016
ty you guys!!!!!