C:\Users\Andy\Documents\Connor\NRP - New\gamemodes\NRP.pwn(2126) : error 001: expected token: ")", but found "{" -
NewerthRoleplay - 14.03.2012
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 ::.");
}
}
Re: C:\Users\Andy\Documents\Connor\NRP - New\gamemodes\NRP.pwn(2126) : error 001: expected token: ")", but found "{" -
Calgon - 14.03.2012
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.
Re: C:\Users\Andy\Documents\Connor\NRP - New\gamemodes\NRP.pwn(2126) : error 001: expected token: ")", but found "{" -
NewerthRoleplay - 14.03.2012
Quote:
Originally Posted by Calgon
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