SA-MP Forums Archive
error 029: invalid expression, assumed zero - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: error 029: invalid expression, assumed zero (/showthread.php?tid=349221)



error 029: invalid expression, assumed zero - sanrock - 08.06.2012

pawn Code:
CMD:human(playerid)
{
    if(gTeam[playerid] == TEAM_HUMAN)return SendClientMessage(playerid, COLOR_RED, "You are already a human");
    else
    {
        if PlayerInfo[playerid][Cantransform] == 1
        {
            ForceClassSelection(playerid);
            SetPlayerHealth(playerid, 0);
        }
        else return SendClientMessage(playerid, 0xFF2222FF, "You need to first kill a human to transform into one");
    }
    return 1;
}
error:
Code:
C:\Users\Jo\MySQL\gamemodes\zombie.pwn(586) : error 029: invalid expression, assumed zero
line:
pawn Code:
{
one before ForceClassSelection(playerid);


Re: error 029: invalid expression, assumed zero - JaKe Elite - 08.06.2012

pawn Code:
CMD:human(playerid)
{
    if(gTeam[playerid] == TEAM_HUMAN)
    {
         SendClientMessage(playerid, COLOR_RED, "You are already a human");
    }
    else
    {
        if(PlayerInfo[playerid][Cantransform] == 1)
        {
            ForceClassSelection(playerid);
            SetPlayerHealth(playerid, 0);
        }
        else return SendClientMessage(playerid, 0xFF2222FF, "You need to first kill a human to transform into one");
    }
    return 1;
}