error 025: function heading differs from prototype
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
new Float:HP, holder[1000];
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);
if(weaponid == 25) SetPlayerHealth(playerid, HP-40);
if(!IsPlayerConnected(playerid)) return 0;
if(!IsPlayerConnected(issuerid)) return 0;
if(issuerid != INVALID_PLAYER_ID)
{
if(weaponid == 0 || weaponid == 1 || weaponid == 2 || weaponid == 3 || weaponid == 4 || weaponid == 5 ||
weaponid == 6 || weaponid == 7 || weaponid == 8 || weaponid == 15)
{
sInfo[playerid][Misc] += 1;
}
}
if(issuerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9)
{
SetPlayerHealth(playerid, 0.0);
}
if(issuerid != INVALID_PLAYER_ID && bodypart == 3)
{
if(weaponid == 22 || weaponid == 23 || weaponid == 24 || weaponid == 25 || weaponid == 26 || weaponid == 27 ||
weaponid == 28 || weaponid == 29 || weaponid == 30 || weaponid == 31 || weaponid == 32 || weaponid == 33 || weaponid == 34)
{
sInfo[playerid][Chest] += 1;
}
}
if(issuerid != INVALID_PLAYER_ID && bodypart == 4)
{
if(weaponid == 22 || weaponid == 23 || weaponid == 24 || weaponid == 25 || weaponid == 26 || weaponid == 27 ||
weaponid == 28 || weaponid == 29 || weaponid == 30 || weaponid == 31 || weaponid == 32 || weaponid == 33 || weaponid == 34)
{
sInfo[playerid][Crotch] += 1;
}
}
if(issuerid != INVALID_PLAYER_ID && bodypart == 5)
{
if(weaponid == 22 || weaponid == 23 || weaponid == 24 || weaponid == 25 || weaponid == 26 || weaponid == 27 ||
weaponid == 28 || weaponid == 29 || weaponid == 30 || weaponid == 31 || weaponid == 32 || weaponid == 33 || weaponid == 34)
{
sInfo[playerid][LArm] += 1;
}
}
if(issuerid != INVALID_PLAYER_ID && bodypart == 6)
{
if(weaponid == 22 || weaponid == 23 || weaponid == 24 || weaponid == 25 || weaponid == 26 || weaponid == 27 ||
weaponid == 28 || weaponid == 29 || weaponid == 30 || weaponid == 31 || weaponid == 32 || weaponid == 33 || weaponid == 34)
{
sInfo[playerid][RArm] += 1;
}
}
if(issuerid != INVALID_PLAYER_ID && bodypart == 7)
{
if(weaponid == 22 || weaponid == 23 || weaponid == 24 || weaponid == 25 || weaponid == 26 || weaponid == 27 ||
weaponid == 28 || weaponid == 29 || weaponid == 30 || weaponid == 31 || weaponid == 32 || weaponid == 33 || weaponid == 34)
{
sInfo[playerid][LLeg] += 1;
}
}
if(issuerid != INVALID_PLAYER_ID && bodypart == 8)
{
if(weaponid == 22 || weaponid == 23 || weaponid == 24 || weaponid == 25 || weaponid == 26 || weaponid == 27 ||
weaponid == 28 || weaponid == 29 || weaponid == 30 || weaponid == 31 || weaponid == 32 || weaponid == 33 || weaponid == 34)
{
sInfo[playerid][RLeg] += 1;
}
}
if(issuerid != INVALID_PLAYER_ID && bodypart == 9)
{
if(weaponid == 22 || weaponid == 23 || weaponid == 24 || weaponid == 25 || weaponid == 26 || weaponid == 27 ||
weaponid == 28 || weaponid == 29 || weaponid == 30 || weaponid == 31 || weaponid == 32 || weaponid == 33 || weaponid == 34)
{
SetPlayerHealth(playerid, HP-70);
sInfo[playerid][Head] += 1;
}
}
if(issuerid != INVALID_PLAYER_ID)
{
PlayerPlaySound(issuerid, 17802, 0.0, 0.0, 0.0);
new Float:hp,string[128];
GetPlayerHealth(playerid,hp);
if(hp - amount < 26 && Fell[playerid] == -1)
{
Fell[playerid] = 1;
SetPlayerHealth(playerid,25.0);
playaDeath[playerid] = SetTimerEx("PlayersDeath",180000,false,"i",playerid);
TogglePlayerControllable(playerid, 0);
ClearAnimations(playerid);
ApplyAnimation(playerid,"CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
if(sInfo[playerid][Misc] > 0)
{
format(string, sizeof(string), ""COL_RED"%d bruises on their body.\n", sInfo[playerid][Misc]);
strcat(holder, string, sizeof(holder));
}
if(sInfo[playerid][Head] > 0)
{
format(string, sizeof(string), ""COL_RED"%d gun shot wound(s) in the head.\n", sInfo[playerid][Head]);
strcat(holder, string, sizeof(holder));
}
if(sInfo[playerid][Chest] > 0)
{
format(string, sizeof(string), ""COL_RED"%d gun shot wound(s) in the chest.\n", sInfo[playerid][Chest]);
strcat(holder, string, sizeof(holder));
}
if(sInfo[playerid][Crotch] > 0)
{
format(string, sizeof(string), ""COL_RED"%d gun shot wound(s) in the crotch.\n", sInfo[playerid][Crotch]);
strcat(holder, string, sizeof(holder));
}
if(sInfo[playerid][LArm] > 0)
{
format(string, sizeof(string), ""COL_RED"%d gun shot wound(s) in the left arm.\n", sInfo[playerid][LArm]);
strcat(holder, string, sizeof(holder));
}
if(sInfo[playerid][RArm] > 0)
{
format(string, sizeof(string), ""COL_RED"%d gun shot wound(s) in the right arm.\n", sInfo[playerid][RArm]);
strcat(holder, string, sizeof(holder));
}
if(sInfo[playerid][LLeg] > 0)
{
format(string, sizeof(string), ""COL_RED"%d gun shot wound(s) in the left leg.\n", sInfo[playerid][LLeg]);
strcat(holder, string, sizeof(holder));
}
if(sInfo[playerid][RLeg] > 0)
{
format(string, sizeof(string), ""COL_RED"%d gun shot wound(s) in the right leg.\n", sInfo[playerid][RLeg]);
strcat(holder, string, sizeof(holder));
}
deathlabel[playerid] = Create3DTextLabel(holder, -1, Deadx[playerid], Deady[playerid], Deadz[playerid], 10.0, 0, 0);
return 0;
}
}
GetPlayerArmour(playerid,PlayerInfo[playerid][pArmour]);
if(actmarker[issuerid] >= 1)
{
TextDrawShowForPlayer(issuerid, HitMarker);
timarker = SetTimerEx("HTD", 250, true, "%d", issuerid);
PlayerPlaySound(issuerid,1057,0,0,0);
}
return 1;
}
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart) { new Float:HP, holder[1000]; 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); if(weaponid == 25) SetPlayerHealth(playerid, HP-40); if(!IsPlayerConnected(playerid)) return 0; if(!IsPlayerConnected(issuerid)) return 0;
error 025: function heading differs from prototype
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
PHP код:
PHP код:
|
use my impl.inc include it will fix it for you http://s000.tinyupload.com/?file_id=...77299110<br />
i also had these errors on the same lines but i fixed my include so it may work for you too copy them to your include/ysi folder |
That doesn't teach anything... To be shown where and why the issues occur is better than simply pasting up a "fix".
|
That would help me greatly, and I would prefer to actually be told what I did wrong or what is wrong.
|
If you read what was linked to you, then you'd know already.
The order of the return from the function is different to what is being handed to it. In this case, the order of the callback, differs from YSIs version. Again, if you had read through what was linked to you, you'd know that... A "fix" is also in there, in instructions, on how to fix that issue. |