C:\Users\Andy\Documents\Connor\NRP - New\gamemodes\NRP.pwn(2126) : error 001: expected token: ")", but found "{"
#1

Hi im getting the error C:\Users\Andy\Documents\Connor\NRP - New\gamemodes\NRP.pwn(2126) : error 001: expected token: ")", but found "{" while i am compiling my script.


Here is the whole command which line 2126 is in.
pawn Code:
CMD:acceptjob(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, -1547.7715,123.7701,3.5547,309.2723)
    {
        pJob[playerid] = TRUCKER;
        SendClientMessage(playerid, COLOR_WHITE, ".:: You have now joined the job, Trucker ::.");
        SendClientMessage(playerid, COLOR_WHITE, ".:: To start work grab a truck and use /startjob ::.");
    }
}
Reply
#2

pawn Code:
CMD:acceptjob(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, -1547.7715,123.7701,3.5547,309.2723)) // Here was the problem
    {
        pJob[playerid] = TRUCKER;
        SendClientMessage(playerid, COLOR_WHITE, ".:: You have now joined the job, Trucker ::.");
        SendClientMessage(playerid, COLOR_WHITE, ".:: To start work grab a truck and use /startjob ::.");
    }
}
You need to add an extra closing bracket whenever you use a function in an if statement, to close the function/if statement.
Reply
#3

Quote:
Originally Posted by Calgon
View Post
pawn Code:
CMD:acceptjob(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, -1547.7715,123.7701,3.5547,309.2723)) // Here was the problem
    {
        pJob[playerid] = TRUCKER;
        SendClientMessage(playerid, COLOR_WHITE, ".:: You have now joined the job, Trucker ::.");
        SendClientMessage(playerid, COLOR_WHITE, ".:: To start work grab a truck and use /startjob ::.");
    }
}
You need to add an extra closing bracket whenever you use a function in an if statement, to close the function/if statement.
Thanks calgon...you are the godfather
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)