[Solved] Missing token, but seems everything is wrigth
#1

I have a trouble, but I can't find where is my mistake, maybe you'll see what's wrong.

Here is errors:
Код:
C:\DOCUME~1\Arnoldas\Desktop\Serveris\Serveris\FILTER~1\INGAME~1.PWN(485) : error 001: expected token: "]", but found "-integer value-"
C:\DOCUME~1\Arnoldas\Desktop\Serveris\Serveris\FILTER~1\INGAME~1.PWN(485) : warning 215: expression has no effect
C:\DOCUME~1\Arnoldas\Desktop\Serveris\Serveris\FILTER~1\INGAME~1.PWN(485) : error 001: expected token: ";", but found "]"
C:\DOCUME~1\Arnoldas\Desktop\Serveris\Serveris\FILTER~1\INGAME~1.PWN(485) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Arnoldas\Desktop\Serveris\Serveris\FILTER~1\INGAME~1.PWN(485) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
And here is part of code:
pawn Код:
if(current == colorsmenu)
    {
        switch(row)
        {
            case 0:
            {
                if(Item[0] == 1)
                {
                    format(MenuItemsString[0], sizeof(MenuItemsString[0]), "%s%s",MenuColors[0], MenuItems[0]); // line 485
                    ShowMenuForPlayer(createmenu, playerid);
                    UpdateMenu2(playerid);
                }

Reply
#2

Maybe this helps a bit:

pawn Код:
format(MenuItemsString[0], sizeof(MenuItemsString[]), "%s%s",MenuColors[0], MenuItems[0]);
Reply
#3

Is the variable MenuColors and MenuItems even a string, not an integer? Try using %d%d instead of %s%s.
Reply
#4

Try this:
pawn Код:
format(MenuItemsString[0], 128, "%s%s", MenuColors[0], MenuItems[0]);
Reply
#5

Oh, thanks. Thats because I have this: new MenuItemsString[12][30] and 30 is not enough. Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)