lethal 0 Posted March 20, 2007 I'm trying to add a few debug actions to the player while building and testing my mission - they are mostly single-line commands and hardly worth making a seperate file for every one of them. Can i use addaction without calling an external script but entering code directly somehow? i have searched the biki and tried a few variations but haven't been successful, yet. Share this post Link to post Share on other sites
t_d 47 Posted March 20, 2007 Make a single Script which calls your single line: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">call _this and in addAction: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_code = {hint "Debug"}; //put your code in the brackets unit addAction ["Debug", "DebugAction.sqf", _code, 0, false, false, ""] Not tested. Share this post Link to post Share on other sites
lethal 0 Posted March 21, 2007 thanks! gonna try that out tomorrow does the "_code" part have to be in string format or can i write code with the "{}" brackets? Share this post Link to post Share on other sites
t_d 47 Posted March 21, 2007 _code = {} have to be in brackets. But I forget that arguments have to be passed as string either that way <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">unit addAction ["Debug", "DebugAction.sqf", "_code", 0, false, false, ""] or maybe that way <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">unit addAction ["Debug", "DebugAction.sqf", str(_code), 0, false, false, ""] You have to test which one is working. Share this post Link to post Share on other sites