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



expected token: ")", but found "{" - ilepopivanov - 15.01.2015

This is my error:
Код:
D:\GameMode\filterscripts\jobs.pwn(1073) : error 001: expected token: ")", but found "{"
And this is my code:
Код:
Line 1073:if(IsPlayerNearObject(playerid, Drvos[0], 6.0){if(ZdravoDrvos[0] == 1){if(Sece[playerid] == 1){SendClientMessage(playerid, -1, "{00FF00}INFO:{FFFFFF}Vekje secete :D");}else{
Line 1074:SetTimerEx("SeceDrvo1", 10000, false, "i", playerid), TogglePlayerControllable(playerid,0), Sece[playerid] = 1, SendClientMessage(playerid, -1, "{00FF00}INFO:{FFFFFF}Zapocnavte so secenje na drvo");}}}



Re: expected token: ")", but found "{" - ilepopivanov - 15.01.2015

Lol fixed http://prntscr.com/5sqwd3
Sorry for spam


Re: expected token: ")", but found "{" - BroZeus - 15.01.2015

the problem is with this -
pawn Код:
if(IsPlayerNearObject(playerid, Drvos[0], 6.0)
a ) is missing there
so it would be -
Quote:

if(IsPlayerNearObject(playerid, Drvos[0], 6.0))



Respuesta: expected token: ")", but found "{" - JuanStone - 15.01.2015

pawn Код:
if(IsPlayerNearObject(playerid, Drvos[0], 6.0)) // error add one ")"
{
    if(ZdravoDrvos[0] == 1)
    {
        if(Sece[playerid] == 1)
        {
            SendClientMessage(playerid, -1, "{00FF00}INFO:{FFFFFF}Vekje secete :D");
        }
        else
        {
            SetTimerEx("SeceDrvo1", 10000, false, "i", playerid), TogglePlayerControllable(playerid,0), Sece[playerid] = 1, SendClientMessage(playerid, -1, "{00FF00}INFO:{FFFFFF}Zapocnavte so secenje na drvo");
        }
    }
}