Small problem, easy fix >_> - 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: Small problem, easy fix >_> (
/showthread.php?tid=391689)
Small problem, easy fix >_> -
Oscii - 11.11.2012
This is my error.
pawn Код:
error 001: expected token: ")", but found "{"
The lines are >_>
pawn Код:
new string[128];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_GREY, "You are not driving a vehicle.");
if(!IsPlayerInRangeOfPoint(playerid, 5, 65.4750,1219.2035,18.8226) && !IsPlayerInRangeOfPoint(playerid, 5, 70.6983,1218.3497,18.8133 && !IsPlayerInRangeOfPoint(playerid, 5, 75.7343,1216.3359,18.8303))
{
SendClientMessage(playerid, COLOR_GREY, "You are not near a gas station.");
return 1;
}
Anyone know the resolution?
Re: Small problem, easy fix >_> -
Konstantinos - 11.11.2012
pawn Код:
if(!IsPlayerInRangeOfPoint(playerid, 5, 65.4750,1219.2035,18.8226) && !IsPlayerInRangeOfPoint(playerid, 5, 70.6983,1218.3497,18.8133) && !IsPlayerInRangeOfPoint(playerid, 5, 75.7343,1216.3359,18.8303))
You forgot to close the ")".
Код:
!IsPlayerInRangeOfPoint(playerid, 5, 70.6983,1218.3497,18.8133)
Re: Small problem, easy fix >_> -
XtremeR - 11.11.2012
will work:
pawn Код:
new string[128];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_GREY, "You are not driving a vehicle.");
if(!IsPlayerInRangeOfPoint(playerid, 5, 65.4750,1219.2035,18.8226)) && !IsPlayerInRangeOfPoint(playerid, 5, 70.6983,1218.3497,18.8133 && !IsPlayerInRangeOfPoint(playerid, 5, 75.7343,1216.3359,18.8303))
{
SendClientMessage(playerid, COLOR_GREY, "You are not near a gas station.");
return 1;
}
Re: Small problem, easy fix >_> -
Oscii - 11.11.2012
Fixed, Thank you very much!
Could you tell me what I may have done wrong please