Warning help.
#1

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.
Reply
#2

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);
Reply
#3

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 , thank you SO much Vince! +1!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)