Annoying issue with 'expected token'
#1

pawn Код:
new edt = Editing[playerid];
                new rankedt = RankEditing[playerid];
                if(!strlen(inputtext))
                    return ShowPlayerDialog(playerid, DIALOG_F_EDITNAME,DIALOG_STYLE_INPUT,"{00c982}FACTION EDIT","{b7ba00}New rank name {ff0000}{You need to actually fill it out!):","Set","Cancel");
                format(FactionRank[edt][rankedt], sizeof(FactionRank[edt][rankedt]),"%s",inputtext);
Errors show:
pawn Код:
rp.pwn(1993) : error 001: expected token: "]", but found "-identifier-"
rp.pwn(1993) : warning 215: expression has no effect
rp.pwn(1993) : error 001: expected token: ";", but found "]"
rp.pwn(1993) : error 029: invalid expression, assumed zero
rp.pwn(1993) : fatal error 107: too many error messages on one line
Line 1993 is the format line.
Reply
#2

Can you send us the whole code please...
For eg. if it is a command include the "CMD:****" part
Reply
#3

pawn Код:
case DIALOG_F_P_RANK:
        {
            if(response)
            {
                new edt = Editing[playerid];
                new rankedt = RankEditing[playerid];
                if(!strlen(inputtext))
                    return ShowPlayerDialog(playerid, DIALOG_F_EDITNAME,DIALOG_STYLE_INPUT,"{00c982}FACTION EDIT","{b7ba00}New rank name {ff0000}{You need to actually fill it out!):","Set","Cancel");
                format(FactionRank[edt][rankedt], sizeof(FactionRank[edt][rankedt]),"%s",inputtext);
                SaveFaction(Editing[playerid]);
            }
            else
                ShowPlayerDialog(playerid, DIALOG_F_EDIT, DIALOG_STYLE_LIST, "{00c982}FACTION EDIT", "Faction name\nFaction Type\nFaction default skin\nFaction ranks\nFaction leader rank\nFaction duty position", "Continue", "Cancel");
        }
Reply
#4

pawn Код:
sizeof(FactionRank[edt][rankedt])
You cannot do that. Use the size directly if it's meant to be a string of course.
Reply
#5

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
pawn Код:
sizeof(FactionRank[edt][rankedt])
You cannot do that. Use the size directly if it's meant to be a string of course.
Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)