Jump to content
Sign in to follow this  
_BARNS_

removeaction prob

Recommended Posts

Hey maybe somebody could help me with this ...

i placed a vehicle named "as" in the editor and in the init i wrote

this addaction ["Test","script.sqs"]

so far so good it works but if i wanna remove this action the problem starts.

i tried with another script remove.sqs

as = vehicle removeAction ["Test"]

but it is not working ... any ideas why?

thx alot for help!

Share this post


Link to post
Share on other sites

this addaction ["Test","script.sqs"] would be as removeaction 0

That I think would remove the first action so is really only useful if there is one action.

Your better giving it a name.

act1 = this addaction ["Test","script.sqs"]

then to remove it it's as removeaction act1

Share this post


Link to post
Share on other sites

Okay i tried this with ...

act1 = this addaction ["Test","script.sqs"]

and to remove i wrote in the script ...

as removeaction act1

BUT i got this error message ...

'as |#|removeaction ["Test"]

'error removeaction: typ array, erwartet Zahl

i have no clue!

Share this post


Link to post
Share on other sites

where are you using the as removeaction act1 line, if it's in a script then all lines should end with a ;

as removeaction act1;

in a trigger it's not as important.

I just noticed your using sqs so that's not the problem, make sure you have no other errors in the script.

Edited by F2k Sel

Share this post


Link to post
Share on other sites

'as |#|removeaction ["Test"]

There should be no such line anywhere in the mission or scripts.

Share this post


Link to post
Share on other sites

problem solved

i added _unit = as

and now it is working! thx alot

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  

×