Errors warnings...
#1

Here is the code
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(gPlayerSpawned[i] == 1)
            {
                new Float:health;
                GetPlayerHealth(i, health);
                if(health < 30)
                {
                    if(IsPlayerInAnyVehicle(i))
                    {
                        RemovePlayerFromVehicle(i);
                        ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
                        GameTextForPlayer(i, "~r~You are injured you need a medic or /acceptdeath !", 5000, 3);
                    }
                    ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
                    GameTextForPlayer(i, "~r~You are injured you need a medic or /acceptdeath!", 5000, 3);
                 }
            }
        }
    }


    }
    if(strcmp(cmd, "/acceptdeath", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            SetPlayerHealth(playerid, 0);
            SendClientMessage(playerid, COLOR_RED, "** You have accepted death !");
        }
Errors is
pawn Код:
C:\Users\Humi\Desktop\REVO-RP\PR-RP\filterscripts\Deathscript.pwn(2) : error 010: invalid function or declaration
C:\Users\Humi\Desktop\REVO-RP\PR-RP\filterscripts\Deathscript.pwn(4) : error 010: invalid function or declaration
C:\Users\Humi\Desktop\REVO-RP\PR-RP\filterscripts\Deathscript.pwn(6) : error 010: invalid function or declaration
C:\Users\Humi\Desktop\REVO-RP\PR-RP\filterscripts\Deathscript.pwn(9) : warning 219: local variable "health" shadows a variable at a preceding level
C:\Users\Humi\Desktop\REVO-RP\PR-RP\filterscripts\Deathscript.pwn(10) : error 010: invalid function or declaration
C:\Users\Humi\Desktop\REVO-RP\PR-RP\filterscripts\Deathscript.pwn(12) : error 010: invalid function or declaration
C:\Users\Humi\Desktop\REVO-RP\PR-RP\filterscripts\Deathscript.pwn(15) : error 010: invalid function or declaration
C:\Users\Humi\Desktop\REVO-RP\PR-RP\filterscripts\Deathscript.pwn(16) : error 010: invalid function or declaration
C:\Users\Humi\Desktop\REVO-RP\PR-RP\filterscripts\Deathscript.pwn(17) : error 054: unmatched closing brace ("}")
C:\Users\Humi\Desktop\REVO-RP\PR-RP\filterscripts\Deathscript.pwn(19) : error 010: invalid function or declaration
C:\Users\Humi\Desktop\REVO-RP\PR-RP\filterscripts\Deathscript.pwn(20) : error 054: unmatched closing brace ("}")
C:\Users\Humi\Desktop\REVO-RP\PR-RP\filterscripts\Deathscript.pwn(26) : error 054: unmatched closing brace ("}")
C:\Users\Humi\Desktop\REVO-RP\PR-RP\filterscripts\Deathscript.pwn(27) : error 010: invalid function or declaration
C:\Users\Humi\Desktop\REVO-RP\PR-RP\filterscripts\Deathscript.pwn(29) : error 010: invalid function or declaration
C:\Users\Humi\Desktop\REVO-RP\PR-RP\filterscripts\Deathscript.pwn(32) : error 010: invalid function or declaration
C:\Users\Humi\Desktop\REVO-RP\PR-RP\filterscripts\Deathscript.pwn(33) : error 054: unmatched closing brace ("}")
C:\Users\Humi\Desktop\REVO-RP\PR-RP\filterscripts\Deathscript.pwn(34) : warning 203: symbol is never used: "health"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)