SA-MP Forums Archive
expected token - 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: expected token (/showthread.php?tid=569451)



expected token - DetoNater - 30.03.2015

this error occurs
Код:
H:\_BFSAMP\gamemodes\bfsamp.pwn(12515) : error 001: expected token: "do", but found "{"
the code in which the error occurs
pawn Код:
if(cache_num_rows() != 0)
    {
        new line[25];
        new ID,name[24],clan,dtime;
        new daycheck = gettime();
        cache_get_data(rows, fields, mysql);
        while cache_get_row(0,0,line)
 this line>> ------- {
            sscanf(line,"p<|>ds[24]dd",ID,name,clan,dtime);
            list++;
            switch(Sprache[playerid])
            {
                case 0:
                {  
                    if(daycheck - dtime > 604800) format(content,sizeof(content),"%s%30s\tLevel: %d\t{FF0000}INAKTIV{FFFFFF}\n",content,name,clan);
                    else format(content,sizeof(content),"%s%30s\tLevel: %d\t{00FF00}AKTIV{FFFFFF}\n",content,name,clan),activity++;
                }
                case 1:
                {
                    if(daycheck - dtime > 604800) format(content,sizeof(content),"%s%24s\tLevel: %d\t{FF0000}INACTIVE{FFFFFF}\n",content,name,clan);
                    else format(content,sizeof(content),"%s%30s\tLevel: %d\t{00FF00}ACTIVE{FFFFFF}\n",content,name,clan),activity++;
                }
                case 2:
                {
                    if(daycheck - dtime > 604800) format(content,sizeof(content),"%s%24s\tNivel: %d\t\t{FF0000}INACTIVO{FFFFFF}\n",content,name,clan);
                    else format(content,sizeof(content),"%s%30s\tNivel: %d\t\t{00FF00}ACTIVO{FFFFFF}\n",content,name,clan),activity++;
                }
            }
            clanmembercheck[playerid][list] = ID;
        }
    }



Re: expected token - Emmet_ - 30.03.2015

Change:

pawn Код:
while cache_get_row(0,0,line)
To

pawn Код:
while (cache_get_row(0,0,line))