SA-MP Forums Archive
error 001: expected token: ",", but found ";" - 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: error 001: expected token: ",", but found ";" (/showthread.php?tid=593641)



error 001: expected token: ",", but found ";" REP+ - MayaEU - 07.11.2015

Hii, can anyone tell me what is wrong with this code?
Of course i will rep+

pawn Код:
if (strcmp("/buy", cmdtext, true, 10) == 0)
    {
        if(!
            (
                PlayerToPoint(100,playerid,-27.3502,-31.1446,1003.5573) &&
                GetPlayerInterior(playerid) == 4
            )
        )
        {
            SendClientMessage(playerid, COLOR_WHITE, "You are not at any 24/7 Stores");
            return 1;
        }
        static str[800 char]; // Increase the size if it does not show the whole text
        if(!str{0})
        {
            str = !"Item\tPrice\n\
            Phone Book\t{00BC2E}$5000{FFFFFF}\n\
            Scratch Card\t{00BC2E}$7500{FFFFFF}\n\
            Deck of Cards\t{00BC2E}$500{FFFFFF}\n\
            Dice\t{00BC2E}$500{FFFFFF}\n\
            Condom\t{00BC2E}$50{FFFFFF}\n\
            Camera\t{00BC2E}$10000{FFFFFF}\n\
            Blindfold\t{00BC2E}$2500{FFFFFF}\n\
            Cigar\t{00BC2E}$100{FFFFFF}\n\
            Briefcase\t{00BC2E}$7500{FFFFFF}\n"
;

            strcat(str, !"{FF6347}Mask\t{FF6347}$5000{FFFFFF}\n\
            Roller Skates\t{00BC2E}$5000{FFFFFF}\n\
            5-Pack Screwdrivers\t{00BC2E}$5000{FFFFFF}\n\
            Hotwire Kit\t{00BC2E}$10000{FFFFFF}\n\
            Small Boombox 1\t{00BC2E}$4000{FFFFFF}\n\
            Small Boombox 2\t{00BC2E}$4000{FFFFFF}\n\
            Medium Boombox\t{00BC2E}$8000{FFFFFF}\n\
            Large Boombox\t{00BC2E}$10000{FFFFFF}\n\
            Smartphone (Bronze)\t{00BC2E}$1000{FFFFFF}\n\
            Smartphone (Lightblue)\t{00BC2E}$1000{FFFFFF}\n"
;
           
            strcat(str, !"Smartphone (Orange)\t{00BC2E}$1000{FFFFFF}\n\
            Smartphone (Black)\t{00BC2E}$1000{FFFFFF}\n\
            Smartphone (Pink)\t{00BC2E}$1000{FFFFFF}\n\
            Smartphone (Red)\t{00BC2E}$1000{FFFFFF}\n\
            Smartphone (Green)\t{00BC2E}$1000{FFFFFF}\n\
            Smartphone (Darkblue)\t{00BC2E}$1000{FFFFFF}\n\
            Smartphone (Yellow)\t{00BC2E}$1000{FFFFFF}\n\
            Smartphone (White)\t{00BC2E}$1000{FFFFFF}"
);
        }
        ShowPlayerDialog(playerid, SHOP, DIALOG_STYLE_TABLIST_HEADERS, ""COL_WHITE"24/7 Store",str,"Select", "Cancel");
        return 1;
    }



Re: error 001: expected token: ",", but found ";" - Jefff - 08.11.2015

Missing ) before ;
pawn Код:
Smartphone (Lightblue)\t{00BC2E}$1000{FFFFFF}\n";