error 025: function heading differs from prototype
#1

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;
}
Reply
#2

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].
Reply
#3

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!
Reply
#4

Oh work! Thanks S4t3K and SilentSoul !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)