error 025: function heading differs from prototype
#1

Can someone tell me What is the Problem with this ?
Код:
Z:\Shock Roleplay 0.3z\gamemodes\SRP.pwn(14875) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart) << Error Line
{
    if(issuerid != INVALID_PLAYER_ID)
    {
        ShotPlayer[issuerid][playerid] = gettime();
        LastShot[playerid] = gettime();
    }
    if(PlayerInfo[playerid][pJustLogged] == 0)
    {
        new Float:HP;
        new Float:Armor;
        GetPlayerHealth(playerid, HP);
        GetPlayerArmour(playerid, Armor);
        if(bodypart == 9)
            {
                SetPlayerHealth(playerid, 0);
                SendClientMessageEx(playerid, COLOR_WHITE, "You Were Shot in the head and you died");
            }
        if(Armor < 1)
        {
            if(weaponid == 31 || weaponid == 30)
            {
                SetPlayerHealth(playerid, HP-(amount*3));
            }
            else if(weaponid == 22)
            {
                SetPlayerHealth(playerid, HP-20);
            }
            else if(weaponid == 34)
            {
                SetPlayerHealth(playerid, HP-100);
            }
            else if(weaponid == 8)
            {
                SetPlayerHealth(playerid, HP-30);
            }
            else if(weaponid == 5)
            {
                SetPlayerHealth(playerid, HP-20);
                new hitrand = random(10);
                if(hitrand <= 5)
                {
                    SendClientMessageEx(playerid, COLOR_GRAD2, "  You have been knocked to the floor by a baseball bat.");
                    ApplyAnimation(playerid,"PED","KO_skid_front",4.1,0,0,0,0,0);
                }
            }
            else if(weaponid == 3)
            {
                SetPlayerHealth(playerid, HP-20);
                new hitrand = random(10);
                if(hitrand <= 5)
                {
                    SendClientMessageEx(playerid, COLOR_GRAD2, "  You have been knocked to the floor by an ASP Baton.");
                    ApplyAnimation(playerid,"PED","KO_skid_front",4.1,0,0,0,0,0);
                }
            }
            else if(weaponid == 15 || weaponid == 4 || weaponid == 2 || weaponid == 6 || weaponid == 7)
            {
                SetPlayerHealth(playerid, HP-20);
            }
            else
            {
                if(weaponid != 26)
                {
                    SetPlayerHealth(playerid, HP-(amount*1.5));
                }
            }
        }
        if(Armor >= 1)
        {
            if(weaponid == 34)
            {
                SetPlayerArmour(playerid, Armor-100);
            }
            if(Armor >= 30)
            {
                if(weaponid == 8)
                {
                    SetPlayerArmour(playerid, Armor-30);
                }
            }
            if(Armor >= 20)
            {
                if(weaponid == 5 || weaponid == 15 || weaponid == 3 || weaponid == 4 || weaponid == 2 || weaponid == 6 || weaponid == 7)
                {
                    SetPlayerArmour(playerid, Armor-20);
                }
            }
        }
    }
    return 1;
}
++ REP
Reply
#2

Are you using YSI?
YSI got issue with the new 0.3z,and bodypart has been added in 0.3z ,and you have to update Ysi to get the issue fixed,and remember to get the new 0.3z pawno and includes from www.sa-mp.com just go to 0.3z and download the files and replace pawno file with yours and update all of the plugins you use.
Do these steps to fix the error...
https://sampforum.blast.hk/showthread.php?tid=488198
Reply
#3

i'm getting this error
Код:
Z:\Shock Roleplay 0.3z\pawno\include\YSI\y_hooks/impl.inc(2391) : error 017: undefined symbol "bodypart"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#4

explain what did you do exactly
Reply
#5

NVM it worked ,forgot to edit something ,Lol ++ Rep'ed
EDIT:Can't Rep you sorry Lol ,as i've Rep'ed you already in the past hour
Reply
#6

thanks,anytime,if you need help pm me
oh yea you repped me for the edit chat ha?
remember to rep me soon
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)