SA-MP Forums Archive
[Solved] Missing token, but seems everything is wrigth - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Solved] Missing token, but seems everything is wrigth (/showthread.php?tid=88294)



[Solved] Missing token, but seems everything is wrigth - arnutisz - 25.07.2009

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);
                }




Re: [Help] Missing token, but seems everything is wrigth - MadeMan - 25.07.2009

Maybe this helps a bit:

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



Re: [Help] Missing token, but seems everything is wrigth - Marcel - 25.07.2009

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


Re: [Help] Missing token, but seems everything is wrigth - Correlli - 25.07.2009

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



Re: [Help] Missing token, but seems everything is wrigth - arnutisz - 25.07.2009

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