error 008: must be a constant expression; assumed zero
#1

Here's the script:
pawn Код:
CMD:andmed(playerid,params[])
{
    if(gPlayerLoggedIn[playerid] == 0) return 1;

    {
    new load[20] = PlayerInfo[playerid][ pLoad ];
    new raha =  GetPlayerMoney(playerid);
    new nimi[MAX_PLAYER_NAME], string[128];
    new vanus = PlayerInfo[playerid][ Age ];
   

    GetPlayerName(playerid, nimi, sizeof(nimi));
    SendClientMessage(playerid, COLOR_WHITE,"____________");
    format(string, sizeof(string),"*** %s ***",nimi);
    SendClientMessage(playerid, COLOR_WHITE,string);
    format(string, sizeof(string), "Raha: %d SAK'i Vanus: %d Autojuhiload: %d", raha, vanus, load);
    SendClientMessage(playerid, COLOR_WHITE,string);
    //format(string, sizeof(string), "Hoiatusi:[%d/5]", warns);
    //SendClientMessage(playerid, COLOR_WHITE,string);
    SendClientMessage(playerid, COLOR_WHITE,"____________");
    if(PlayerInfo[playerid][pLoad] == 0)
    { load = "Puuduvad"; }
    else if(PlayerInfo[playerid][pLoad] == 1)
    { load = "Olemas"; }
    }
    return 1;
}
And here's the error:
Код:
error 008: must be a constant expression; assumed zero
And the error is for this line:
pawn Код:
new load[20] = PlayerInfo[playerid][ pLoad ];
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)