dialog errors
#1

pawn Код:
format(string, sizeof(string), "NOTICE: %s has given you admin rights.", name);
ShowPlayerDialog(playerid, DIALOG_ADMIN_GIVEN, DIALOG_STYLE_MSGBOX, "Euphoria", string, "OK", "");
second line gives me these errors

pawn Код:
(460) : error 029: invalid expression, assumed zero
(460) : warning 215: expression has no effect
(460) : warning 215: expression has no effect
(460) : warning 215: expression has no effect
(460) : warning 215: expression has no effect
(460) : warning 215: expression has no effect
(460) : error 001: expected token: ";", but found ")"
(460) : error 029: invalid expression, assumed zero
(460) : fatal error 107: too many error messages on one line
Reply
#2

post more lines
Reply
#3

pawn Код:
CMD:makeadmin(playerid,params[])
{
    new level, id, name[24], string[72];
    if(!IsPlayerAdmin(playerid)) return 1;
    if(sscanf(params, "ui", id, level)) return SendClientMessage(playerid, -1, "USAGE: /makeadmin [playerid] [1-5]");
    if(level < 0 || level > 5) return SendClientMessage(playerid, -1, "USAGE: /makeadmin [playerid] [1-5]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ERROR: Player is not connected.");
    if(PlayerInfo[id][pAdmin] == level) return SendClientMessage(playerid, -1, "ERROR: Selected player is already this level.");
    GetPlayerName(id, name, sizeof(name));
    format(string, sizeof(string), "NOTICE: You have given %s admin rights.", name);
    SendClientMessage(playerid, -1, string);
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "NOTICE: %s has given you admin rights.", name);
    ShowPlayerDialog(playerid, DIALOG_ADMIN_GIVEN, DIALOG_STYLE_MSGBOX, "Euphoria", string, "OK", "");
    PlayerInfo[playerid][pAdmin] = level;
    return 1;
}
Reply
#4

the code does not contain any error, so the compiler tells me.
Reply
#5

wait what? really?
Reply
#6

oh nvm, fixed it! something was wrong with my dialog define!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)