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(playeridreason)
{
    new 
query[128],
    
mysql_format(mysqlquerysizeof(query), "UPDATE `database` SET `pEXP` = %d, `Premium` = %d, `pAdminLevel` = %d,",
    
pInfo[playerid][pEXP], pInfo[playerid][Premium], pInfo[playerid][pAdminLevel]);
    
mysql_tquery(mysqlquery"""");
    
SetPVarInt(playerid"laser"0);
     
RemovePlayerAttachedObject(playerid0);
    if(
InfectedLeft[playerid] == 1)
    {
        
ZombieTimer SetTimer("ZombieCounts",3000,1);
        
InfectedLeft[playerid] = 0;
    }
    return 
1;

error code
PHP Code:
zma.pwn(1045) : warning 219local variable "mysql_format" shadows a variable at a preceding level
zma
.pwn(1045) : error 001expected token";"but found "("
zma.pwn(1045 -- 1046) : warning 215expression has no effect
zma
.pwn(1045) : warning 203symbol is never used"mysql_format" 

please help


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

Code:
new query[128],