fortun 14 Posted January 15, 2014 (edited) update! *GOT EVERYTHING WORKING!!! Hello! Was working on a mission in August/September. Was just in beginning learning how to script. But after that i have had a pause until now. Seems that some scripting functions must have been changed or something, cause im getting errors now that i didn't have before. 1: I was using this script for hostage rescue http://www.kylania.com/ex/?p=11 I use the same code _per = _this select 0; // Person who had the addAction _ldr = _this select 1; // Person who used the addAction _act = _this select 2; // ID of the addAction // Group given in the arguments section (ie: [POWS] _grp = _this select 3 select 0; // Remove the rescue option _per removeAction _act; // Join preselected units (POWS) to callers group, silently. {[_x] joinSilent _ldr} forEach _grp; But now, it gives me this error {[_x] joinsilent _ldr} for each |#|_grp; Error undefined variable in expression: _grp line 12 Screenshot: http://i.imgur.com/rm2vHiP.jpg 2: I was using the UAV script http://arma.kodered.de/blog/%5Bhow-to%5D-showcase-intro-sat-maps.aspx But now, is also seems to have some problems The code i use for UAV camUseNVG true; // set side colors private ["_colorWest", "_colorEast"]; _colorWest = WEST call BIS_fnc_sideColor; _colorEast = EAST call BIS_fnc_sideColor; // set transparency for colors {_x set [3, 0.73]} forEach [_colorWest, _colorEast]; true SetCamUseTi 1; [ markerPos "Church", // Target position (replace MARKERNAME) "Church with enemys", // SITREP text 100, // 400m altitude 100, // 200m radius 0, // 0 degrees viewing angle 0, // Clockwise movement [ // add Icon at player's position ["\a3\ui_f\data\map\markers\nato\b_inf.paa", _colorWest, getPos T2, 1, 1, 0, "Tim", 0], // add Icon at enemy/target position ["\a3\ui_f\data\map\markers\nato\o_inf.paa", _colorEast, markerPos "Church", 1, 1, 0, "House with enemys", 0] ] ] spawn BIS_fnc_establishingShot; Screenshot: http://i.imgur.com/KySltTE.jpg Please help! Edited January 15, 2014 by FortuN Share this post Link to post Share on other sites
iceman77 19 Posted January 15, 2014 (edited) Not sure how it's intended to work exactly but this is how I got the example to work after a brief glance. init.sqf POWS = [p1,p2,p3,p4]; { _id = _x addAction ["Rescue POWs","rescuePows.sqf",[POWS],1,false,true,"","(_target distance _this) < 3"]; } forEach POWS; rescuePows.sqf _per = _this select 0; // Person who had the addAction _ldr = _this select 1; // Person who used the addAction _act = _this select 2; // ID of the addAction // Group given in the arguments section (ie: [POWS] _grp = _this select 3 select 0; // Remove the rescue option _per removeAction _act; // Join preselected units (POWS) to callers group, silently. {[_x] joinSilent _ldr} forEach _grp; Not sure about the UAV stuff. Edited January 15, 2014 by Iceman77 Added the action to the POWs rather than the player... Share this post Link to post Share on other sites
fortun 14 Posted January 15, 2014 Not sure how it's intended to work exactly but this is how I got the example to work after a brief glance. init.sqf POWS = [p1,p2,p3,p4]; { _id = _x addAction ["Rescue POWs","rescuePows.sqf",[POWS],1,false,true,"","(_target distance _this) < 3"]; } forEach POWS; rescuePows.sqf _per = _this select 0; // Person who had the addAction _ldr = _this select 1; // Person who used the addAction _act = _this select 2; // ID of the addAction // Group given in the arguments section (ie: [POWS] _grp = _this select 3 select 0; // Remove the rescue option _per removeAction _act; // Join preselected units (POWS) to callers group, silently. {[_x] joinSilent _ldr} forEach _grp; Not sure about the UAV stuff. Thanks! Seems like i had somehow deleted POWS = [p1,p2,p3,p4]; in the init. Also, for question 2, a name was changed in the script which did everything caotic. Thread can be locked, got everything working! :) Share this post Link to post Share on other sites
dr_strangepete 6 Posted January 15, 2014 what are you passing it instead of POWS? Seeing the rest of the code would greatly help. nevermind! :) Share this post Link to post Share on other sites
iceman77 19 Posted January 15, 2014 Thanks! ...Also, for question 2, a name was changed in the script which did everything caotic. Thread can be locked, got everything working! :) No problem. Glad everything works now. Share this post Link to post Share on other sites