OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: NightJay0044 on 31 Jan 2009, 18:41:17

Title: GetPos basic script (solved)
Post by: NightJay0044 on 31 Jan 2009, 18:41:17
Hi I created a script like this;

Quote
; ****************************************************************
; Script file for Armed Assault
; Created by: TODO: Author Name
; ****************************************************************

; Get the parameters given
_bmp1 = _this Select 0
_bmp2 = _this Select 1

_bmp1 getpos player
_bmp2 getpos player

Exit


I want the two BMP's to get the position of player.

This is how I executed the script.

Quote
[bmp1, bmp2] exec "bmp.sqs"

It doesn't work, the error says..


Quote
missing ;

Why is this? Am I on the right track? Can someone help me fix it, thanks.


-----
FIXED
-----

Nevermind fixed the problem..I was missing the
Quote
=
in the sqs file between the
Quote
_bmp = getpos
player
Title: Re: GetPos basic script (solved)
Post by: Rommel92 on 31 Jan 2009, 23:01:27
You mention solved, but this script doesn't make any sense.
Code: [Select]
; ****************************************************************
; Script file for Armed Assault
; Created by: TODO: Author Name
; ****************************************************************

; Get the parameters given
_bmp1 = _this Select 0;
_bmp2 = _this Select 1;

_bmp1 setpos (position player); //teleports _bmp1 to the position of the player
_bmp2 setpos (position player); //teleports _bmp2 to the position of the player

Exit

Your current code has "[bmp1, bmp2] exec "bmp.sqs"" as its execution, but the two parameters will become completely void the second its launched as your redefine them as a position [x,y,z] array.  :dunno: