OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: greg147 on 26 Nov 2005, 15:40:57

Title: Simple addaction problem
Post by: greg147 on 26 Nov 2005, 15:40:57
Hi all,

I've searched around for this, and I can't see whats wrong.

I've got a simple script that activates when the player enters a trigger.

Code: [Select]
arty1 = aP addaction ["Call artillery strike","trig.sqs"]
aP being the player, trig being the script name and arty1 being the name I want the action to have (so I can remove it later)

But I get an error that says

arty1 |#| = aP addaction ["Call artillery strike","trig.sqs"]: Error reserved variable in expression

I can't work out whats wrong with this. It doesn't work in a trigger or a script.
Can anyone tell me whats wrong?

Thanks.
Title: Re:Simple addaction problem
Post by: Triggerhappy on 26 Nov 2005, 16:20:13
arty1 is apparently used by the game (perhaps an addon or mod you're running?) try changing the name
Title: Re:Simple addaction problem
Post by: greg147 on 26 Nov 2005, 16:35:24
Bah, I should have thought of that  ;)

I changed it to 'action1' and it works fine. Thanks.