error 025: function heading differs from prototype
#1

Idk why....

error code
Код:
error 025: function heading differs from prototype
script :

pawn Код:
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
    new Float:vehhealth;
    GetVehicleHealth(vehicleid, vehhealth);
    if(vehhealth < 400)
    {
        TogglePlayerControllable(playerid, 0);
        Engine[vehicleid] = 0;
        FreezeVehicle(vehicleid, 1);
        SendClientMessage(playerid, COLOR_RED, "(ONSTAR) This car is totalled!");
    }
    }
}
Reply
#2

Seems to work fine for me.
Reply
#3

Your code is compiling at my computer without any errors at all (with my own FreezeVehicle function),

Can you give us more information, like at which line this error occurs (and which code is at that line) ?

The error itself basicly means that you are trying to use invalid parameters on a function,

Example:

GOOD:
pawn Код:
public OnPlayerConnect(playerid)
{
    return 1;
}
WRONG:
pawn Код:
public OnPlayerConnect(playerid,param2much) //different parameters!!
{
    return 1;
}
pawn Код:
public OnPlayerConnect(vehicleid) //wrong parameter!!
{
    return 1;
}
Reply
#4

(2371) : error 025: function heading differs from prototype

line 2371 :

pawn Код:
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
I have it placed under OnDialogResponse

It must of already been defined.

I done
pawn Код:
forward DamageCheck(vehicleid, playerid);
public DamageCheck(vehicleid, playerid)
and it compiled fine
Reply
#5

Now the script aint even working, I smashed my car untill it blew up
Reply
#6

It wont work if you change it.
https://sampwiki.blast.hk/wiki/OnVehicleDamageStatusUpdate
Reply
#7

well I don't know what the problem is, maybe its defined in a include?
Reply
#8

This topic seems old.But for the people who wants to know the fix, Its easy just compile it with a another pawno.exe program.
Reply
#9

LOL it's 3 years ago captain
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)