SA-MP Forums Archive
HELP ? - 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: HELP ? (/showthread.php?tid=512141)



HELP ? - HOB1x - 09.05.2014

pawn Код:
C:\Users\user\Desktop\MetLifeLS\MetLife\gamemodes\MetLife.pwn(47026) : error 029: invalid expression, assumed zero
C:\Users\user\Desktop\MetLifeLS\MetLife\gamemodes\MetLife.pwn(47026) : error 001: expected token: ";", but found ")"
C:\Users\user\Desktop\MetLifeLS\MetLife\gamemodes\MetLife.pwn(47026) : error 029: invalid expression, assumed zero
C:\Users\user\Desktop\MetLifeLS\MetLife\gamemodes\MetLife.pwn(47026) : fatal error 107: too many error messages on one line
Linija 47026
pawn Код:
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);



Re: HELP ? - Ciandlah - 09.05.2014

There is no error there, It will have something to do with your string not the SCM message.

The compiler is just saying that the error is there, when its actually under the formatted string. Show us that


Re: HELP ? - HOB1x - 09.05.2014

pawn Код:
CMD:makeadmin(playerid,params[])
{
    if(PlayerInfo[playerid][pAdmin] >=  || (IsPlayerAdmin(playerid)))
    {
        new id,level,giveplayer[MAX_PLAYER_NAME+1],sendername[MAX_PLAYER_NAME+1],string[128];
        if(sscanf(params, "ri", id,level)) return SendClientMessage(playerid,-1, "{FFEA02}(Koristi):{FFFFFF} /gadmin [ID/Ime na Igrac] [level(0-1340)]");
        if(level > 1883 || level < 0) { SendClientMessage(playerid,-1, "{F81414}GRESKA:{FFFFFF}:{FFFFFF}Ne mozete ispod 0 ili preko 1883!"); return 1; }
        GetPlayerName(id, giveplayer, sizeof(giveplayer));
        GetPlayerName(playerid, sendername, sizeof(sendername));
        PlayerInfo[id][pAdmin] = level;
        format(string, sizeof(string), "   Ovlasteni ste so admin level %d od administrator %s", level, sendername);
        SendClientMessage(id, COLOR_LIGHTBLUE, string);
        format(string, sizeof(string), "   Go promoviravte  %s vo Admin level %d", giveplayer,level);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    }
    else return SendClientMessage(playerid,-1, "{F81414}GRESKA:{FFFFFF}:{FFFFFF}Nemozete da ja koristite ovaa komanda.");
    return 1;
}
This is that command where have error i think


Re: HELP ? - Ciandlah - 09.05.2014

Quote:

new string[256];
format(string, sizeof(string), "Go promoviravte %s vo Admin level %d", giveplayer, level);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);

Try this, be sure to keep your work simple and tidy.


Re: HELP ? - HOB1x - 09.05.2014

thanks man.
REPUTATION!!!!!