Odd Error.
#1

I'm getting this weird error:
pawn Код:
error 029: invalid expression, assumed zero
This is the whole code around that line:
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
    if((0 <= weaponid <= 46 || weaponid == 54)
    { //This is the line the error's on.
        if(BODY_PART_TORSO <= bodypart <= BODY_PART_HEAD) Damage[playerid][(bodypart - 3)][weaponid]++;
    }
    if (PlayerData[playerid][pFirstAid])
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, "[WARNING]:{FFFFFF} Your first aid kit is no longer in effect as you took damage.");

        PlayerData[playerid][pFirstAid] = 0;
        KillTimer(PlayerData[playerid][pAidTimer]);
    }
    if(actmarker[issuerid] >= 1)
    {
        TextDrawShowForPlayer(issuerid, HitMarker);
        timarker = SetTimerEx("HTD", 250, true, "%d", issuerid);
        PlayerPlaySound(issuerid, 1057, 0, 0, 0);
    }
    return 1;
}
I honestly don't see what's wrong.
Reply
#2

Have to many (

look:

if((0 <= weaponid <= 46 || weaponid == 54)
Reply
#3

Quote:
Originally Posted by PT
Посмотреть сообщение
Have to many (

look:

if((0 <= weaponid <= 46 || weaponid == 54)
Oh wow! Thank you so much, such a silly error. xD +REP!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)