[OnPlayerTakeDamage]: function heading differs from prototype
#1

Its a problem that I've never ran into before, still using all the update includes and so that i started my project with, but for some reason its giving me the error (Code can bee seen below), and i know for a fact its correct.

Код:
F:\SA-MP\scripts\gamemodes\this-script.pwn(938) : error 025: function heading differs from prototype
Code:
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
    if(IsLogged(playerid) && CharSpawned(playerid))
    {
        if(IsLogged(issuerid) && CharSpawned(issuerid))
            return -1;

        if(IsWearingKevlar(playerid))
        {
            if(bodypart == BODY_PART_TORSO || bodypart == BODY_PART_GROIN)
            {

            }
        }
    }  
    return true;
}
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=488198

Please +Rep if i help you
Reply
#3

Quote:
Originally Posted by Humza
Посмотреть сообщение
Thanks for you assistance, I wasn't able to find this while search (As for giving you rep, that isn't going to happen because you asked for it. Reputation is earned)
Reply
#4

Test this
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
    if(IsLogged(playerid) && CharSpawned(playerid))
    {
        if(IsLogged(issuerid) && CharSpawned(issuerid))
            return 1;

        if(IsWearingKevlar(playerid))
        {
            if(bodypart == BODY_PART_TORSO || bodypart == BODY_PART_GROIN)
            {

            }
        }
    }   
    return true;
}
Reply
#5

Quote:
Originally Posted by zT KiNgKoNg
Посмотреть сообщение
Thanks for you assistance, I wasn't able to find this while search (As for giving you rep, that isn't going to happen because you asked for it. Reputation is earned)
Roger Sir But i see some people doing the same that i did , for now u tell me now i will don't do this thing again thx sir for notifying my mistake


Sorry i am not good in English language

Regards,
Humza
Reply
#6

Quote:
Originally Posted by SA-MP Wiki
bodypart The body part that was hit. (NOTE: This parameter was added in 0.3z. Leave it out if using an older version!)
Basically, you're using an older version of the 'a_samp' include, which means that the 'bodypart' parameter has not been included, thus you just need to update your SA-MP includes for this error to disappear.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)