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=380630)
Expected token ) but found { ? -
Benzke - 26.09.2012
Any ideas ?
pawn Код:
command(refuel, playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 5, -173.0663,2686.0369,62.6836) || IsPlayerInRangeOfPoint(playerid, 2, -754.8677,3016.7512,40.9653)
{ // Line causing the error.
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFFC800FF,"You are not in an vehicle!");
if(isrefuelling[playerid]) return SendClientMessage(playerid,0xFFC800FF,"You are already refuelling!");
if(GetPlayerMoney(playerid) - 5 <0) return SendClientMessage(playerid,0xFFC800FF,"You dont have enough money!");
GivePlayerMoney(playerid,-80);
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid,0);
isrefuelling[playerid] = 1;
TextDrawSetString(td_fuel[playerid],"Refueling your vehicle.");
SetTimerEx("timer_refuel",4500,false,"i",playerid);
return 1;
}
return 1;
}
And the error code
Код:
error 001: expected token: ")", but found "{"
Line 21244 is {
Re: Expected token ) but found { ? -
newbienoob - 26.09.2012
Put another bracket ")" here
pawn Код:
|| IsPlayerInRangeOfPoint(playerid, 2, -754.8677,3016.7512,40.9653)) //here
Re: Expected token ) but found { ? -
Benzke - 26.09.2012
Darn it! Didn't noticed it. Thank you. ( Rep'd you. )