Small problem, easy fix >_>
#1

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?
Reply
#2

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)
Reply
#3

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;
    }
Reply
#4

Fixed, Thank you very much!

Could you tell me what I may have done wrong please
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)