SA-MP Forums Archive
Problem with code for gates - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem with code for gates (/showthread.php?tid=332988)



Problem with code for gates - stormchaser206 - 09.04.2012

Is it anything in this:
http://pastebin.com/HJhsV2Aw

That is causing these errors:
Код:
C:\Users\Keegan\Desktop\gamemodes\WorldWar.pwn(2066) : error 017: undefined symbol "IsObjectMoving"
C:\Users\Keegan\Desktop\gamemodes\WorldWar.pwn(2071) : error 001: expected token: ")", but found "{"
C:\Users\Keegan\Desktop\gamemodes\WorldWar.pwn(2075) : warning 202: number of arguments does not match definition
C:\Users\Keegan\Desktop\gamemodes\WorldWar.pwn(2075) : warning 202: number of arguments does not match definition
C:\Users\Keegan\Desktop\gamemodes\WorldWar.pwn(2075) : warning 202: number of arguments does not match definition
C:\Users\Keegan\Desktop\gamemodes\WorldWar.pwn(2080) : warning 202: number of arguments does not match definition
C:\Users\Keegan\Desktop\gamemodes\WorldWar.pwn(2080) : warning 202: number of arguments does not match definition
C:\Users\Keegan\Desktop\gamemodes\WorldWar.pwn(2080) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
I am trying to create a gate, Can anyone help?


Re: Problem with code for gates - ViniBorn - 09.04.2012

pawn Код:
if(IsPlayerConnected(i && IsPlayerInRangeOfPoint(i, 15.0, 2664.6685, -1803.4414, 9.7622))
//Replace
if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i, 15.0, 2664.6685, -1803.4414, 9.7622))



Re: Problem with code for gates - Jack.7331 - 09.04.2012

On line 2071 you need an extra ) after the ID (I)


Re: Problem with code for gates - Jonny5 - 09.04.2012

is it server version 0.3d or later?

if your on 0.3c it wont work as it dont support that function.


Re: Problem with code for gates - stormchaser206 - 09.04.2012

Its 0.3d, And viniborn, Rep+ cause that fixed one error, but now i still have the IsObjectMoving error.


Re: Problem with code for gates - ViniBorn - 09.04.2012

IsObjectMoving was added in SA-MP 0.3d.

You are compiling with the correct pawncc?


Re: Problem with code for gates - stormchaser206 - 09.04.2012

Yea?


Re: Problem with code for gates - Jack.7331 - 09.04.2012

Hmm..
Are you sure your includes and plugins are up to date? (0.3d)


Re: Problem with code for gates - stormchaser206 - 09.04.2012

That might be the problem, I cant find IsObjectMoving in a_objects.inc or a_samp.inc. Maybe can you upload
0.3d one?


Re: Problem with code for gates - ViniBorn - 09.04.2012

a_objects

Код:
/*  SA-MP Object Functions
 *
 *  © Copyright 2005-2011, SA-MP Team
 *
 */

#if defined _objects_included
	#endinput
#endif
#define _objects_included
#pragma library objects

// Objects

native CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance = 0.0);
native AttachObjectToVehicle(objectid, vehicleid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ);
native AttachObjectToObject(objectid, attachtoid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ, SyncRotation = 1);
native AttachObjectToPlayer(objectid, playerid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ);
native SetObjectPos(objectid, Float:X, Float:Y, Float:Z);
native GetObjectPos(objectid, &Float:X, &Float:Y, &Float:Z);
native SetObjectRot(objectid, Float:RotX, Float:RotY, Float:RotZ);
native GetObjectRot(objectid, &Float:RotX, &Float:RotY, &Float:RotZ);
native IsValidObject(objectid);
native DestroyObject(objectid);
native MoveObject(objectid, Float:X, Float:Y, Float:Z, Float:Speed, Float:RotX = -1000.0, Float:RotY = -1000.0, Float:RotZ = -1000.0);
native StopObject(objectid);
native IsObjectMoving(objectid);
native CreatePlayerObject(playerid, modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance = 0.0);
native SetPlayerObjectPos(playerid, objectid, Float:X, Float:Y, Float:Z);
native GetPlayerObjectPos(playerid, objectid, &Float:X, &Float:Y, &Float:Z);
native SetPlayerObjectRot(playerid, objectid, Float:RotX, Float:RotY, Float:RotZ);
native GetPlayerObjectRot(playerid, objectid, &Float:RotX, &Float:RotY, &Float:RotZ);
native IsValidPlayerObject(playerid, objectid);
native DestroyPlayerObject(playerid, objectid);
native MovePlayerObject(playerid, objectid, Float:X, Float:Y, Float:Z, Float:Speed, Float:RotX = -1000.0, Float:RotY = -1000.0, Float:RotZ = -1000.0);
native StopPlayerObject(playerid, objectid);
native IsPlayerObjectMoving(playerid, objectid);
native AttachPlayerObjectToPlayer(objectplayer, objectid, attachplayer, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:rX, Float:rY, Float:rZ);