Problem with code
#1

The error:

PHP код:
C:\Users\tal\Desktop\лммй\им\щшъй ощзч\IRP (0.3z)\filterscripts\Death_System.pwn(19 -- 20) : error 029invalid expressionassumed zero
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
1 Error

The code:

PHP код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#define col_grey 0xADADADFF
#define COLOR_RED 0xAA3333AA
new bool:isplayerwell[MAX_PLAYERS];
public 
OnPlayerUpdate(playerid)
{
    new 
Float:health;
    
GetPlayerHealth(playeridhealth);
    if(
isplayerwell[playerid] == true && health <= 20)
    {
        
ApplyAnimation(playerid"CRACK""crckdeth2"4.010000);
        
isplayerwell[playerid] = false;
    }
    else(
isplayerwell[playerid] == false && health >= 30)
    {
        
ClearAnimations(playerid);
        
isplayerwell[playerid] = true;
    }
    return 
1;

Reply
#2

?
Reply
#3

What line is 19-20? Besides, it's only been 14 minutes. No need to bump that soon because the forum traffic has barely been increased.

EDIT: Could've just posted here instead of making a new topic. >.>
Reply
#4

You need to just remove this chunk

else(isplayerwell[playerid] == false && health >= 30)
{
ClearAnimations(playerid);
isplayerwell[playerid] = true;
}

clearanimations in onplayerupdate wouldn't work well
Reply
#5

Actually else goes without any expression. You should use else if instead.

pawn Код:
else if(isplayerwell[playerid] == false && health >= 30)
{
    ClearAnimations(playerid);
    isplayerwell[playerid] = true;
}
Reply
#6

else if (isplayerwell[playerid] == false && health >= 30)
{
ClearAnimations(playerid);
isplayerwell[playerid] = true;
}
Reply
#7

EDIT: 2 min 2 slow.
Reply
#8

Try this if(isplayerwell[playerid] == true && health < 21)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)