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=604121)



Warning 208: function with tag result used before definition, forcing reparse - Tass007 - 01.04.2016

I'm getting this warning
Код:
warning 208: function with tag result used before definition, forcing reparse
on this line

PHP код:
Float:GetVehicleHealth2(vehicleid) 
The full code is

PHP код:
Float:GetVehicleHealth2(vehicleid)
{
    new 
Float:health;
    
GetVehicleHealth(vehicleid, health);
    return 
health < 250.0 ? 100.0 : (100.0 - (health / 10)) * 1.333333;
} 
Please help, as always the person who offers help will get +1 rep


Re: Warning 208: function with tag result used before definition, forcing reparse - itsCody - 01.04.2016

Either move it to the top of the script or place it RIGHT before you use the function.


Re: Warning 208: function with tag result used before definition, forcing reparse - Tass007 - 01.04.2016

Thank you, I fixed it.