error 025: function heading differs from prototype
#1

I don't understand....

Код:
C:\Users\Test\Desktop\APRP\pawno\include\ELC_AC_BASE.inc(1098) : error 025: function heading differs from prototype

C:\Users\Test\Desktop\APRP\gamemodes\Roleplay.pwn(12953) : error 025: function heading differs from prototype

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
    new Float:HP;
    GetPlayerHealth(playerid, HP);
    if(weaponid == 4) SetPlayerHealth(playerid, HP-30);
    if(weaponid == 22) SetPlayerHealth(playerid, HP-25);
    if(weaponid == 32) SetPlayerHealth(playerid, HP-25);
    if(weaponid == 28) SetPlayerHealth(playerid, HP-25);
    if(weaponid == 30) SetPlayerHealth(playerid, HP-30);
    if(weaponid == 31) SetPlayerHealth(playerid, HP-21);
    if(weaponid == 34) SetPlayerHealth(playerid, HP-70);
    if(weaponid == 29) SetPlayerHealth(playerid, HP-25);
Reply
#2

The parameter 'bodypart' was added in 0.3z. Make sure all your includes are updated to include the 'bodypart' parameter if you're using 0.3z or newer.
Reply
#3

i am using 0.3.7 and where do i put it?
Reply
#4

Look for "OnPlayerTakeDamage" in whichever include is causing the issue and make sure it says:

Код:
OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
Reply
#5

Alright let me try it.
Reply
#6

Its not in the include.. I get
Код:
C:\Users\Test\Desktop\APRP\pawno\include\ELC_AC_BASE.inc(1098) : error 025: function heading differs from prototype

public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z)
Reply
#7

it's in the ELC_AC_BASE.inc include, search for OnPlayerTakeDamage and replace it with
pawn Код:
forward OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
Reply
#8

Quote:
Originally Posted by Vaishnav
Посмотреть сообщение
it's in the ELC_AC_BASE.inc include, search for OnPlayerTakeDamage and replace it with
pawn Код:
forward OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
Did you read what he put? It's a different public now.

public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z)
Reply
#9

pawn Код:
(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z)
OnUnoccupiedVehicleUpdate

Edit: disregard, thought you were missing a variable.
Reply
#10

Quote:
Originally Posted by DaniceMcHarley
Посмотреть сообщение
pawn Код:
(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z)
OnUnoccupiedVehicleUpdate

Edit: disregard, thought you were missing a variable.
Still not working
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)