Warning help. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Warning help. (
/showthread.php?tid=275144)
Warning help. -
iGetty - 08.08.2011
I'm havin' a little bit of trouble with this:
Код:
LINE 34373: warning 208: function with tag result used before definition, forcing reparse
Line 34373:
pawn Код:
stock Float:GetVehicleSpeed(vehicleid,UseMPH = 0)
This is the rest of the stock:
pawn Код:
stock Float:GetVehicleSpeed(vehicleid,UseMPH = 0)
{
new Float:speed_x,Float:speed_y,Float:speed_z,Float:temp_speed;
GetVehicleVelocity(vehicleid,speed_x,speed_y,speed_z);
if(UseMPH == 0)
{
temp_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*136.666667;
} else {
temp_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*85.4166672;
}
floatround(temp_speed,floatround_round);return temp_speed;
}
I'm sorry for the post, and I hope that somebody can help me for some rep :3.
Re: Warning help. -
Vince - 08.08.2011
It means you have used the function before it was defined. To solve it you can either move that stock to somewhere on top of your gamemode or forward it like you would do with a regular public function.
pawn Код:
forward Float:GetVehicleSpeed(vehicleid,UseMPH = 0);
Re: Warning help. -
iGetty - 08.08.2011
Quote:
Originally Posted by Vince
It means you have used the function before it was defined. To solve it you can either move that stock to somewhere on top of your gamemode or forward it like you would do with a regular public function.
pawn Код:
forward Float:GetVehicleSpeed(vehicleid,UseMPH = 0);
|
I will have a try at moving it, then I will edit this post with the outcome, thanks Vince :3.
EDIT: Yay
![Cheesy](images/smilies/biggrin.png)
, thank you SO much Vince! +1!