Home   Help Search Login Register  

Author Topic: GetPos basic script (solved)  (Read 1033 times)

0 Members and 1 Guest are viewing this topic.

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
GetPos basic script (solved)
« 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
« Last Edit: 31 Jan 2009, 18:49:49 by NightJay0044 »
Who's hyped for Arma4, long live Arma!

Offline Rommel92

  • Members
  • *
Re: GetPos basic script (solved)
« Reply #1 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: