12.02.2011, 23:42
I'm trying to create a unity station gate, but I keep getting this error.
The Script.
Forwards.
New.
OnLoadObjects
Publics.
Function.
Line 18430 is,
Please help =]
Код:
C:\Users\Desertsoulz_2\Desktop\Server\gamemodes\VortexRoleplay.pwn(18430) : error 029: invalid expression, assumed zero C:\Users\Desertsoulz_2\Desktop\Server\gamemodes\VortexRoleplay.pwn(18430) : warning 215: expression has no effect C:\Users\Desertsoulz_2\Desktop\Server\gamemodes\VortexRoleplay.pwn(18430) : error 001: expected token: ";", but found "if" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
Forwards.
pawn Код:
forward CloseUnityGate();
pawn Код:
new UnityGate, UnityGateOpen;
pawn Код:
UnityGate = CreateDynamicObject(971, 1811.03, -1893.73, 12.60, 0.00, 0.00, 90.00);
pawn Код:
public CloseUnityGate()
{
MoveDynamicObject(UnityGate, 1811.03, -1893.73, 8.83, 1);
UnityGateOpen = 0;
return 1;
}
pawn Код:
command(gate, playerid, params[])
{
#pragma unused params
new string[128];
if(Groups[Player[playerid][Group]][CommandTypes] == 11)
{
GetPlayerPos(playerid, Positions[0][0], Positions[0][1], Positions[0][2]);
GetDynamicObjectPos(UnityGate, Positions[2][0], Positions[2][1], Positions[2][2]);
if(GetDistance(Positions[0][0], Positions[0][1], Positions[0][2], Positions[2][0], Positions[2][1], Positions[2][2]) < 30.0)
{
if(UnityGateOpen == 0)
{
format(string, sizeof(string), "* %s uses their remote to open the gates.", GetName(playerid));
NearByMessage(playerid, NICESKY, string);
MoveDynamicObject(UnityGate, 1811.03, -1893.73, 8.83, 1);
GateOpen = 1;
SetTimer("CloseUnityGate", 5000, false);
}
else
{
SendClientMessage(playerid, WHITE, "The gate is already open, wait for it to close.");
}
}
}
return 1;
}
pawn Код:
if(GetDistance(Positions[0][0], Positions[0][1], Positions[0][2], Positions[2][0], Positions[2][1], Positions[2][2]) < 30.0)