error 010: invalid function or declaration -
Primard - 05.03.2015
Error:
Код:
C:\Users\blank\Documents\Personal Things\GTA files\GTA SA files\SAMP\filterscripts\Admin_System.pwn(111) : error 010: invalid function or declaration
Line:
Код:
forward GateCheck();
public GateCheck()
{
for(new i; i < MAX_PLAYERS; i++) // Start the loop
{
if((IsPlayerInRangeOfPoint(i, 15.0, 1089.3264, 2513.0588, 9.8871)) && (P_Data[i][pAdmin] >= 1 || IsPlayerAdmin(i)) //Check if any admin is in the area. Replace '8.0, 3.0, 10.0' with your own coordinates of your closed gate.
)
if(gateopen == false) // If the gate isn't open...
{
MoveObject(gate, 1078.1086, 2512.6570, 9.8871, 3.5); //Then open it! Change '32.0, 12.0, 10.0' to the coordinates of your opened gate.
gateopen = true; // Setting this to true indicates it's open(ing)
}
return; //This closes the callback
}
}
//This is called if nobody has been found near the gate. Obviously, because 'return' would fully close the function and this wouldn't be used then.
Line 111: if(gateopen == true) //If the gate IS open, but there's no one near..
{
MoveObject(gate, 1089.3264, 2513.0588, 9.8871, 3.5); // Change the '8.0, 3.0, 10.0' to the coordinates of your gate when it's closed.
gateopen = false; //This indicates the gate is closed again. Or at least, closing.
}
}
Re: error 010: invalid function or declaration -
CalvinC - 05.03.2015
At the IsPlayerInRangeOfPoint, you're using ) instead of {.
Re: error 010: invalid function or declaration -
Primard - 05.03.2015
which )? there is so many ) on that line
Re: error 010: invalid function or declaration -
CalvinC - 05.03.2015
pawn Код:
if((IsPlayerInRangeOfPoint(i, 15.0, 1089.3264, 2513.0588, 9.8871)) && (P_Data[i][pAdmin] >= 1 || IsPlayerAdmin(i)) //Check if any admin is in the area. Replace '8.0, 3.0, 10.0' with your own coordinates of your closed gate.
)
if(gateopen == false) // If the gate isn't open...
{
Should be:
pawn Код:
if((IsPlayerInRangeOfPoint(i, 15.0, 1089.3264, 2513.0588, 9.8871)) && (P_Data[i][pAdmin] >= 1 || IsPlayerAdmin(i)) //Check if any admin is in the area. Replace '8.0, 3.0, 10.0' with your own coordinates of your closed gate.
{
if(gateopen == false) // If the gate isn't open...
{
Re: error 010: invalid function or declaration -
Primard - 05.03.2015
----Problem Solved----
I just redid before all those errors and changed and it worked, sorry for troubling you CalvinC
Re: error 010: invalid function or declaration -
X337 - 05.03.2015
What about this
Код:
if((IsPlayerInRangeOfPoint(i, 15.0, 1089.3264, 2513.0588, 9.8871)) && (P_Data[i][pAdmin] >= 1 || IsPlayerAdmin(i)) //Check if any admin is in the area. Replace '8.0, 3.0, 10.0' with your own coordinates of your closed gate.
to :
Код:
if((IsPlayerInRangeOfPoint(i, 15.0, 1089.3264, 2513.0588, 9.8871) && P_Data[i][pAdmin] >= 1) || IsPlayerAdmin(i)) //Check if any admin is in the area. Replace '8.0, 3.0, 10.0' with your own coordinates of your closed gate.
Re: error 010: invalid function or declaration -
CalvinC - 05.03.2015
Quote:
if((IsPlayerInRangeOfPoint(i, 15.0, 1089.3264, 2513.0588, 9.8871)) && (P_Data[i][pAdmin] >= 1 || IsPlayerAdmin(i))
|
You didn't end this properly.
Incase you cant see, i marked it with colors, as you can see, the red one isn't closed.
You need a last closing brace on the end to close the red one.