Two errors - 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: Two errors (
/showthread.php?tid=571296)
Two errors -
Alex_T - 17.04.2015
(1817) : error 025: function heading differs from prototype
(1827) : error 025: function heading differs from prototype
PHP код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart) //1817
{
if(issuerid != INVALID_PLAYER_ID)
{
if(GetPVarInt(playerid, "aFly") == 1) return 1;
PlayerPlaySound(issuerid, 17802, 0, 0, 0);
}
return 1;
}
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart) //1827
{
if(GetPVarInt(damagedid, "AdminDuty" ) == 1 && gPlayerInfo[playerid][pAlevel] < 1)
GameTextForPlayer(playerid, "~r~DON'T SHOOT ADMINS ON DUTY!", 10000, 6);
if(gPlayerInfo[playerid][pTeam] == gPlayerInfo[damagedid][pTeam] && !IsPlayerInAnyVehicle(playerid) && gPlayerInfo[playerid][pAlevel]< 1)
GameTextForPlayer(playerid, "~r~Don't shoot your team mates!", 900, 6);
return 1;
}
Re: Two errors -
Jimmy0wns - 17.04.2015
Update your default includes, the ones you're currently using are outdated, you can just overwrite the pawn folder with the 0.3z files if you want to. This is because the parameters of this function have been updated.
Re: Two errors -
Azula - 17.04.2015
you have a old 0.3x or just remove body part
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)