error 025: function heading differs from prototype - 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)
+--- Thread: error 025: function heading differs from prototype (
/showthread.php?tid=514975)
error 025: function heading differs from prototype -
Slicebook - 24.05.2014
help please 1error!!
(0.3z)
Код:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart) <<ERROR
{
if(bodypart == BODY_PART_LEFT_LEG)
{
if(damagedid != INVALID_PLAYER_ID && IsPlayerConnected(damagedid))
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Bal Lбbon lőtted, ezйrt nem tud mozogni!");
TogglePlayerControllable(damagedid, false);
SetPlayerDrunkLevel(damagedid, 50000);
ApplyAnimation(damagedid, "SWEET", "Sweet_injuredloop", 4.0, 1, 0, 0, 0, 0);
SetPlayerArmedWeapon(damagedid, 0);
SendClientMessage(damagedid, COLOR_LIGHTRED, "Bal Lбbon lőttek, ezйrt nem bнrsz mozogni!");
}
}
else if(bodypart == BODY_PART_RIGHT_LEG)
{
if(damagedid != INVALID_PLAYER_ID && IsPlayerConnected(damagedid))
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Jobb lбbon lőtted, ezйrt nem tud mozogni!");
TogglePlayerControllable(damagedid, false);
SetPlayerDrunkLevel(damagedid, 50000);
ApplyAnimation(damagedid, "SWEET", "Sweet_injuredloop", 4.0, 1, 0, 0, 0, 0);
SetPlayerArmedWeapon(damagedid, 0);
SendClientMessage(damagedid, COLOR_LIGHTRED, "Jobb Lбbon lőttek, ezйrt nem bнrsz mozogni!");
}
}
else if(bodypart == BODY_PART_HEAD)
{
if(damagedid != INVALID_PLAYER_ID && IsPlayerConnected(damagedid))
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Fejenlőtted, ezйrt sъlyosan megsйrьlt йs kуrhбzba kerьlt!");
SendClientMessage(damagedid, COLOR_LIGHTRED, "Fejenlőttek, ezйrt sъlyosan megsйrьltйl!");
SetPlayerHealth(damagedid,0);
}
}
return 1;
}
Re : error 025: function heading differs from prototype -
S4t3K - 24.05.2014
Are you sure you have the 0.3z a_samp include ?
Also, use either [pawn] [*/pawn] or the [php] [*/php] blocks (without the *) to give us some code, it's far clearer than the simple [code] [*/code].
Re: error 025: function heading differs from prototype -
SilentSoul - 24.05.2014
It seems like you have added bodypart function in your callback, without updating your package to 0.3z,
http://files.sa-mp.com/samp03z_svr_R1_win32.zip update your package and re-compile your script!
Re: error 025: function heading differs from prototype -
Slicebook - 24.05.2014
Oh work! Thanks S4t3K and SilentSoul !