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=630814)
error 025: function heading differs from prototype -
RedGun2015 - 18.03.2017
My error:
Код:
error 025: function heading differs from prototype
line:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
code:
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
if(issuerid != INVALID_PLAYER_ID)
{
if(amount < 0)
{
new string[256],sendername[25];
GetPlayerName(issuerid,sendername,sizeof(sendername));
format(string, sizeof(string), "(N) %s (%d, level %d) can use global kill, damage: %.2f.",sendername,issuerid,PlayerInfo[issuerid][pLevel],amount);
ABroadCast(COLOR_RED1,string,1);
return 1;
}
if(weaponid == 54 && GetPlayerState(issuerid) != PLAYER_STATE_DRIVER)
{
if(playerdeath[issuerid] == 0)
{
new Float:HP, Float:AP, Float:remainHP;
GetPlayerHealthEx(issuerid,HP);
GetPlayerArmourEx(issuerid,AP);
if ( AP >= amount )
{
SetPlayerArmourEx( issuerid, AP - amount );
SetPlayerHealthEx( issuerid, HP );
}
else if ( AP <= 0 )
{
remainHP = HP - amount;
SetPlayerHealthEx( issuerid, remainHP );
if ( remainHP <= 0 && playerdeath[issuerid] == 0 )
{
OnPlayerDeath( playerid, issuerid, weaponid );
playerdeath[playerid] = 1;
}
}
else
{
remainHP = HP + ( AP - amount );
SetPlayerArmourEx( issuerid, 0.0 );
SetPlayerHealthEx( issuerid, remainHP );
if ( remainHP <= 0 && playerdeath[issuerid] == 0 )
{
OnPlayerDeath( playerid, issuerid, weaponid );
playerdeath[issuerid] = 1;
}
}
}
}
}
if(weaponid == 49 || weaponid == 50 || weaponid == 51 || weaponid == 52 || weaponid == 53 || weaponid == 54 || GetPlayerState(issuerid) == PLAYER_STATE_DRIVER)
{
if(playerdeath[playerid] == 0)
{
new Float:HP, Float:AP, Float:remainHP;
GetPlayerHealthEx(playerid,HP);
GetPlayerArmourEx(playerid,AP);
if ( AP >= amount )
{
SetPlayerArmourEx( playerid, AP - amount );
SetPlayerHealthEx( playerid, HP );
}
else if ( AP <= 0 )
{
remainHP = HP - amount;
SetPlayerHealthEx( playerid, remainHP );
if ( remainHP <= 0 && playerdeath[playerid] == 0 )
{
OnPlayerDeath( playerid, issuerid, weaponid );
playerdeath[playerid] = 1;
}
}
else
{
remainHP = HP + ( AP - amount );
SetPlayerArmourEx( playerid, 0.0 );
SetPlayerHealthEx( playerid, remainHP );
if ( remainHP <= 0 && playerdeath[playerid] == 0 )
{
OnPlayerDeath( playerid, issuerid, weaponid );
playerdeath[playerid] = 1;
}
}
}
}
return 1;
}
Help pls?
Re: error 025: function heading differs from prototype - iLearner - 18.03.2017
https://sampforum.blast.hk/showthread.php?tid=488198
Re: error 025: function heading differs from prototype -
Toroi - 18.03.2017
Update your a_samp include.
What other includes are you using?
Re: error 025: function heading differs from prototype -
RedGun2015 - 18.03.2017
can u give me a link to download? i don't have folder YSI, please