Joe Miller 0 Posted July 25, 2005 Hello i've a problem with addaction. Example: This Addaction ["Sell him Drugs", "isdrugged.sqs"] This is what i tiped, but i need to call some variables of isdrugged.sqs So i need theese variables: _Unit = _this select 0 _drug = _this select 1 _DA= this select 2 So when i call "isdrugged.sqs" i need for example: [this,weed,da1] exec "isdrugged.sqs" but i need to call it with an action. So how can i do? Share this post Link to post Share on other sites
klavan 0 Posted July 25, 2005 Try: This Addaction ["Sell him Drugs", "[this,weed,da1] exec isdrugged.sqs"] I've tested it and I received a missing script message, so I think the sintax is right. Klavan EDIT Never mind it it's wrong. Sorry. Share this post Link to post Share on other sites
crashdome 3 Posted July 25, 2005 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">This Addaction ["Sell him Drugs", "isdrugged.sqs"] is correct You cannot send any other parameters to an action script (AFAIK). The only ones available are: _this select 0: object action is attached to _this select 1: object that executed the action _this select 2: index of action Share this post Link to post Share on other sites
Blanco 0 Posted July 26, 2005 Well do this : This Addaction ["Sell him Drugs", "drugact.sqs"] <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ;drugact.sqs (_this select 0) removeaction (_this select 2) [_this select 1,weed,da1] exec "isdrugged.sqs" exit Share this post Link to post Share on other sites