Jump to content
Sign in to follow this  
MeNeZ

Artillery script problem

Recommended Posts

HI,

I dont know how but I somehow broke the scirpt? It was working fine and now I get funny errors.

Soo, I deleted all the arty stuff and re-merged it but its still doing the same thing. It works fine by itself too, just dies after I merge.

Basically only 1 gun out of the 6 fire and I get a string of errors complaing about the arty's ammo...it goes like this:

` _A > _K l#l Ammo "M119"`

Error ammo:Type Number,expected object

Any ideas?

It does the same for the west too? huh.gif

Share this post


Link to post
Share on other sites

Close ArmA. Launch it again. If still remaining the same... restart the computer.

Be sure you are not playing ArmA with some mission files opened (your scripts).

This last is not a MUST, but sometimes is helping.

Quote[/b] ]_A > _K l#l Ammo "M119"

Try always the 'truth'of parenthesis:

(_A > (_K ammo "M119"))

Or maybe... the error is shouting you... _K is number, not object 'vehicle' (soldier?).

Share this post


Link to post
Share on other sites

THe thing is, it works perfectly as it is. Its only when I merge onto my map something goes wrong.

Also sometimes, instead of it saying M113 ammo, it says D30. huh.gif

Share this post


Link to post
Share on other sites

'D30' is the weapon for EAST.

'M119' is the weapon for WEST.

Maybe you 'mixing' enemy by friendly

AND/OR

friendly by enemy.

Check your scripts. Maybe some variables don't taking into account if the 'vehicle' is enemy or friendly when you handling 'ammo'.

Track the variable _K.

Share this post


Link to post
Share on other sites

I found the K vairable. Here is the whole script.

But why would it not working after merging as it works fine by itself?

******************8

~Random 2

_K = _this select 0

_Z = _this select 1

_X = Getpos _Z select 0

_Y = Getpos _Z select 1

_K DoWatch [_X,_Y,5000]

_A =_K Ammo "M119"

~5

_K fire "M119"

#Next

@ _A > _K Ammo "M119"

_K exec "westari\artismoke.sqs"

~2

_N = nearestObject [_K,"HeatM119"]

_X = _X+((Random 60)-40)

_Y = _Y+((Random 60)-40)

_H = "HeliHEmpty" CreateVehicle [_X,_Y]

~1

_H say "Ari"

~1

_N setpos [_X,_Y,0]

_Bomb="SH_125_HE" CreateVehicle [_X,_Y,0]

_H exec "westari\artismoke.sqs"

~0.5

deleteVehicle _H

exit

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×