SA-MP Forums Archive
I need some help: - 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: I need some help: (/showthread.php?tid=337341)



I need some help: - nogh445 - 25.04.2012

This is the pawn code:

pawn Код:
Gate = CreateDynamicObject(980, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance);

Heres the error:

Код:
C:\Users\user\Desktop\New\pawno\new.pwn(241) : error 017: undefined symbol "X"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: I need some help: - DonWade - 25.04.2012

new Float: X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);

add that above


Re: I need some help: - Yuryfury - 25.04.2012

What map editor did you use to create the gate? You will probably need a map to samp object converter

You need to get the X, Y, Z and rotation coordinates and use those. Set the draw distance to something like 200. All of the variables need to be numbers (in your case).

You want it to look something like this:
pawn Код:
Gate = CreateDynamicObject(980, 125.215, 632.352, 1363.23, 179.27 0, 0, 200);
I made up the coordinates, you need to input your own.


Re: I need some help: - nogh445 - 25.04.2012

Ok.. So this is at the top:
pawn Код:
new Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance;
This is under Public OnGameModeInIt:
pawn Код:
Gate = CreateDynamicObject(980, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance);
And I still get this error:

Код:
C:\Users\user\Desktop\New\pawno\new.pwn(243) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
:


Re: I need some help: - Yuryfury - 25.04.2012

You have not assigned a number/float to X, Y, Z, rX, rY, rZ, or drawdistance.

You need to do:
pawn Код:
new Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance;

X = 124.522; // you need an actual coordinate
Y = 1434.672; // you need an actual coordinate
Z = 16.204; // you need an actual coordinate
rX=0;
rY=0;
rZ=0;
DrawDistance=200;

Gate = CreateDynamicObject(980, X, Y, Z, rX, rY, rZ,DrawDistance); //do not include the Float:
Where do you want to put this gate?


Re: I need some help: - nogh445 - 26.04.2012

I have found it out.