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=611952)



error 001: expected token: ";", but found "(" - Izaki - 12.07.2016

PHP Code:
public OnPlayerDisconnect(playerid, reason)
{
    new 
query[128],
    
mysql_format(mysql, query, sizeof(query), "UPDATE `database` SET `pEXP` = %d, `Premium` = %d, `pAdminLevel` = %d,",
    
pInfo[playerid][pEXP], pInfo[playerid][Premium], pInfo[playerid][pAdminLevel]);
    
mysql_tquery(mysql, query, "", "");
    
SetPVarInt(playerid, "laser", 0);
     
RemovePlayerAttachedObject(playerid, 0);
    if(
InfectedLeft[playerid] == 1)
    {
        
ZombieTimer = SetTimer("ZombieCounts",3000,1);
        
InfectedLeft[playerid] = 0;
    }
    return 
1;
} 
error code
PHP Code:
zma.pwn(1045) : warning 219: local variable "mysql_format" shadows a variable at a preceding level
zma
.pwn(1045) : error 001: expected token: ";", but found "("
zma.pwn(1045 -- 1046) : warning 215: expression has no effect
zma
.pwn(1045) : warning 203: symbol is never used: "mysql_format" 

please help


Re: error 001: expected token: ";", but found "(" - F1N4L - 12.07.2016

Code:
new query[128],