function with tag result used before definition, forcing reparse
#1

Warning:
pawn Код:
downtown.pwn(571) : warning 208: function with tag result used before definition, forcing reparse
stock:
PHP код:
stock Float:GetPlayerSpeed(playerid)// LINE 571
{
    static 
Float:velocity[3];
    if (
IsPlayerInAnyVehicle(playerid))
        
GetVehicleVelocity(GetPlayerVehicleID(playerid), velocity[0], velocity[1], velocity[2]);
    else
        
GetPlayerVelocity(GetPlayerVehicleID(playerid), velocity[0], velocity[1], velocity[2]);
    return 
floatsqroot((velocity[0] * velocity[0]) + (velocity[1] * velocity[1]) + (velocity[2] * velocity[2])) * 100.0;

Reply
#2

PHP код:
forward GetPlayerSpeed(playerid);
public 
GetPlayerSpeed(playerid)
{
    static 
Float:velocity[3];
    if (
IsPlayerInAnyVehicle(playerid))
        
GetVehicleVelocity(GetPlayerVehicleID(playerid), velocity[0], velocity[1], velocity[2]);
    else
        
GetPlayerVelocity(GetPlayerVehicleID(playerid), velocity[0], velocity[1], velocity[2]);
    return 
floatsqroot((velocity[0] * velocity[0]) + (velocity[1] * velocity[1]) + (velocity[2] * velocity[2])) * 100.0;

Second option would be that you put the "stock" under your includes (before the lines where you use this function).
Reply
#3

It doesn't need to be public, it only needs to be forwarded.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)