having trouble with OnPlayerGiveDamage
#1

I keep getting this - error 025: function heading differs from prototype

I don't understand... i tried copy pasting it from the sticky topic that Kalcor made, then i tried copy pasting right from a_samp, then i downloaded the server again onto a different drive to make sure i was using the correct pawno... still the same error.

here's the callback that i'm trying to compile:
PHP код:
public OnPlayerGiveDamage(playeriddamagedidFloat:amountweaponidbodypart)
{
    if(!
IsPlayerConnected(playerid)) return 0;
    if(
bodypart == BODY_PART_HEAD)
    {
        
SendClientMessage(playeridgreen"HEADSHOT");
    }
    if(
busy[playerid] == && gTeam[playerid] == gTeam[damagedid] && GetPlayerWeapon(playerid) == 41)
    {
        
healer(damagedid);
    }
    else if(
busy[playerid] == && gTeam[playerid] == gTeam[damagedid])
    {
        
SendClientMessage(playeridred"WATCH YOUR FIRE");
    }
    if(
exammo[playerid] == && gTeam[playerid] != gTeam[damagedid])
    {
        
incindiary(damagedid);
    }
    if(
GetPlayerWeapon(playerid) == 23 && gTeam[playerid] != gTeam[damagedid])
    {
        
panic(damagedid);
    }
    return 
1;

I just put that headshot message to test if the bodypart thing will work, before I added the "bodypart" param to the callback it was compiling with no errors or warnings. Is anyone else having this problem or am I just an idiot somehow?
Reply
#2

Are you using YSI? If so:
https://sampforum.blast.hk/showthread.php?tid=488198
Reply
#3

thanks a lot man, works
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)