banky 4 Posted July 31, 2013 (edited) I took a good look at the main error that would not go away and I believe I managed to get it fixed. If anyone wants to try and see if it works for them, just copy the code below and paste it over lines 373 to 398 in the \scripts\Init_UPSMON.sqf. Make sure you open the "INIT_upsmon" file and not the regular UPSMON.sqf. The spacing is important too. { if (!isnull _x && alive _x && !captive _x) then { _npc = _x; _targets = []; switch (side _npc) do { //West targets case west: { _sharedenemy = 0; _enemyside = [east]; }; //East targets case east: { _sharedenemy = 1; _enemyside = [west]; }; //Resistance targets case resistance: { _sharedenemy = 2; _enemyside = KRON_UPS_Res_enemy; }; }; if (side _npc in KRON_UPS_Res_enemy) then { _enemyside = _enemyside + [resistance]; }; }forEach _x; There are still some undefined errors that pop up in the main UPSMON.sqf for things like _lastcurrpos and I think a _buildingpos when you are engaging the enemy, but I haven't had time to look into those yet. Maybe if we keep a log of errors we come across here one of us will be able to figure them out. Also, I'm using the most recent UPSMON from post #113 in this thread. Don't know if others will be different. Edited July 31, 2013 by Banky Share this post Link to post Share on other sites
jgaz-uk 132 Posted August 1, 2013 (edited) BIS_fnc_taskPatrol has always had that problem for me, they walk off for miles, even into the sea sometimes, it's useless.Also BIS_fnc_taskDefend always gives an error message when it's called from that actual BI script containing the function, not the script where it's executed. CBA Task Patrol is great, it works well and it has a lot of options you can set, but it means running an addon just for a few patrols. Here is a simple script for spawning a group with CBA TaskPatrol for anybody having trouble with it (these are 3rd party arma 2 units though, you'll need to change them to arma 3): // 0 = ["spawnmarker"] execVM "spawnUnitspatrol.sqf" if (!isServer) exitWith {}; _spawnPos = markerPos (_this select 0); _group1 = createGroup EAST; _unit1 = _group1 createUnit ["RW_MVD_Soldier_TL", [_spawnPos select 0,_spawnPos select 1,1], [], 1, "FORM"]; sleep 0.2; _unit2 = _group1 createUnit ["RW_MVD_Soldier", [_spawnPos select 0,_spawnPos select 1,1], [], 1, "FORM"]; sleep 0.2; _unit3 = _group1 createUnit ["RW_MVD_Soldier_Marksman", [_spawnPos select 0,_spawnPos select 1,1], [], 1, "FORM"]; sleep 0.2; _unit4 = _group1 createUnit ["RW_MVD_Soldier", [_spawnPos select 0,_spawnPos select 1,1], [], 1, "FORM"]; sleep 0.2; _unit5 = _group1 createUnit ["RW_MVD_Soldier", [_spawnPos select 0,_spawnPos select 1,1], [], 1, "FORM"]; sleep 0.2; _unit6 = _group1 createUnit ["RW_MVD_Soldier", [_spawnPos select 0,_spawnPos select 1,1], [], 1, "FORM"]; sleep 0.2; [_group1, _spawnPos, 150, 7, "MOVE", "AWARE", "YELLOW", "LIMITED", "WEDGE", "", [3,6,9]] call CBA_fnc_taskPatrol; I found if you set a distance of anything less than 50 they will walk off for miles. best to put 100 as min. To test where they will patrol put yourself in as part of the squad & you see waypoints on the map. Edited August 2, 2013 by jgaz-uk Share this post Link to post Share on other sites
ollem 4 Posted August 1, 2013 I took a good look at the main error that would not go away and I believe I managed to get it fixed. If anyone wants to try and see if it works for them, just copy the code below and paste it over lines 373 to 398 in the \scripts\Init_UPSMON.sqf. Make sure you open the "INIT_upsmon" file and not the regular UPSMON.sqf. There are still some undefined errors that pop up in the main UPSMON.sqf for things like _lastcurrpos and I think a _buildingpos when you are engaging the enemy, but I haven't had time to look into those yet. Maybe if we keep a log of errors we come across here one of us will be able to figure them out. Also, I'm using the most recent UPSMON from post #113 in this thread. Don't know if others will be different. I've also spent some time fixing upsmon. Haven't been able to check every feature but at least for the default settings the error messages are gone. Will share the code here later this week. Share this post Link to post Share on other sites
shay_gman 272 Posted August 1, 2013 You can dowload the new version for MCC here. It should work bug free : https://github.com/shaygman/shayProjects/tree/master/mcc/mcc_sandbox.Stratis/scripts Share this post Link to post Share on other sites
SavageCDN 231 Posted August 1, 2013 Thanks shay_gman!!! Soo.... .now you're working on updating DAC right?? :p Share this post Link to post Share on other sites
shay_gman 272 Posted August 2, 2013 Haha no. not DAV atm. Someone should rup the files from Git and make them as stand alone. Share this post Link to post Share on other sites
Beerkan 71 Posted August 4, 2013 OK gents, I think I finally have a working UPSMON script error free working with the latest Beta. This would not be possible with the help of many of you posting ideas and solutions in this thread, with the greatest help given by shay_gman. Please post any errors or suggestions, and as always big thanks to Monsada for creating the script in the first place. Get UPSMON.rar here. N.B. This version is completely stand alone, and will work without the need to set MCC_Path etc. Share this post Link to post Share on other sites
pokertour 30 Posted August 4, 2013 OH yeah ! Good work guys ! I have no errors :) Share this post Link to post Share on other sites
jgaz-uk 132 Posted August 4, 2013 Downloading now:yay: many thanks to all concerned ! Share this post Link to post Share on other sites
1para{god-father} 105 Posted August 4, 2013 great work ! Share this post Link to post Share on other sites
ebarstad 18 Posted August 4, 2013 (edited) Thanks so much for uploading an error-free version! I spent quite a few hours yesterday trying to remove the errors myself to no avail. When I first load the new version up, I do get an error for line 367 (iirc) of init_upsmon.sqf. Here's the RPT: Error in expression <ts1 = []; _targets2 = []; { if (!isnull _x && alive _x && !captive _x ) then { > Error position: <_x && alive _x && !captive _x ) then { > Error Undefined variable in expression: _x File C:\Users\Eric\Documents\Arma 3\missions\UPSMON_-_Agia_Marina.Stratis\scripts\Init_UPSMON.sqf, line 367 Edited August 4, 2013 by ebarstad Added RPT Share this post Link to post Share on other sites
Silvarin 10 Posted August 4, 2013 I get the same errror message as above. Line 367 of int_upsmon.sqf. Dev version btw. Share this post Link to post Share on other sites
banky 4 Posted August 5, 2013 I'm getting it too, but only if I spawn a group ingame that uses upsmon. Share this post Link to post Share on other sites
DChristy87 1 Posted August 5, 2013 Interesting, I'm not getting any errors for the last posted version. However, my patrol groups aren't respawning as I would like then to. They respawn 2 or 3 times and quit. I only have "respawn" in the parameters not "respawn:", 3 or anything. Anyone know what could cause them to respawn only a few times? Share this post Link to post Share on other sites
ollem 4 Posted August 5, 2013 (edited) When I first load the new version up, I do get an error for line 367 (iirc) of init_upsmon.sqf. Here's the RPT: Error in expression <ts1 = []; _targets2 = []; { if (!isnull _x && alive _x && !captive _x ) then { > Error position: <_x && alive _x && !captive _x ) then { > Error Undefined variable in expression: _x File C:\Users\Eric\Documents\Arma 3\missions\UPSMON_-_Agia_Marina.Stratis\scripts\Init_UPSMON.sqf, line 367 I faced that issue too and fixed it as follows: UPSMON_init.sqf - around line 205: replace KRON_relPos = {private["_p","_d","_a","_x","_y","_xout","_yout"];_p=_this select 0; _x=_p select 0; _y=_p select 1; _d=_this select 1; _a=_this select 2; _xout=_x + sin(_a)*_d; _yout=_y + cos(_a)*_d;[_xout,_yout,0]}; with KRON_relPos = {private["_p","_d","_a","_xx","_yy","_xout","_yout"];_p=_this select 0; _xx=_p select 0; _yy=_p select 1; _d=_this select 1; _a=_this select 2; _xout=_xx + sin(_a)*_d; _yout=_yy + cos(_a)*_d;[_xout,_yout,0]}; around line 370: replace { if (!isnull _x && alive _x && !captive _x ) then { _npc = _x; _targets = []; with { if ( _forEachIndex > 0 && {!isnull _x} && {alive _x} && {!captive _x} ) then { _npc = _x; _targets = []; Edited August 5, 2013 by Ollem Share this post Link to post Share on other sites
Beerkan 71 Posted August 5, 2013 (edited) Interesting, I'm not getting any errors for the last posted version. However, my patrol groups aren't respawning as I would like then to. They respawn 2 or 3 times and quit. I only have "respawn" in the parameters not "respawn:", 3 or anything. Anyone know what could cause them to respawn only a few times?I've checked this by spawning just one man.Here's my trigger script. if (!isServer) exitWith {}; _spawnPoint = _this select 0; _patrolArea = _this select 1; _side = if (count _this > 3) then {_this select 3} else {EAST}; _skill = if (count _this > 4) then {_this select 4} else {[0.1, 0.4]}; // _units = if (count _this > 2) then {_this select 2} else {["O_Soldier_TL_F","O_soldier_AR_F","O_soldier_GL_F","O_soldier_F","O_medic_F","O_soldier_exp_F","O_Soldier_LAT_F"]}; _units = if (count _this > 2) then {_this select 2} else {["O_Soldier_TL_F"]}; _pos = getMarkerPos _spawnPoint; _grp = [_pos, _side, _units, [], [], _skill] call BIS_fnc_spawnGroup; sleep 3; [_grp,_patrolArea,"NOWAIT","RANDOMDN","SPAWNED","RESPAWN","DELETE:",300] execVM "scripts\upsmon.sqf"; This works fine and my bad guy respawned over ten times after I killed him, before I gave up trying. It would take me quite a while to test, as the variable is _respawnmax = 10000; i.e it's set to respawn 10000 times. HOWEVER, I believe you may be falling foul of this condition // respawn = allow squad to respawn when all members are dead and[b] [color="#FF0000"]no targets near[/color][/b] The no targets near variable is set to 300m so if you're within that, then the unit will not respawn. See this in UPSMON.sqf ---------- Post added at 09:13 PM ---------- Previous post was at 09:02 PM ---------- By the way, re-download UPSMON.rar, I've added Ollem's fix mentioned above. UPSMON.rar All previous links point to this version too. Edited August 5, 2013 by Beerkan Share this post Link to post Share on other sites
ebarstad 18 Posted August 5, 2013 Beerkan, thanks for keeping the script updated and uploaded. Thanks, too, to all the other contributors who are keeping UPSMON alive. Share this post Link to post Share on other sites
DChristy87 1 Posted August 5, 2013 Ohhhh I see! BUT does the no targets near refer to the patrol area or spawn area? nul=[this,"Area1","townspawn", "move","reinforcement", "delete:",200,"respawn"] execVM "scripts\upsmon.sqf"; in that example, will near refer to "Area1" or "townspawn"? Share this post Link to post Share on other sites
Beerkan 71 Posted August 5, 2013 (edited) Ohhhh I see! BUT does the no targets near refer to the patrol area or spawn area? in that example, will near refer to "Area1" or "townspawn"? If you're within 300m of the spawn marker they won't spawn. So in your example, it's if you're within 300m of the "townspawn".I've been thinking about your issue.. You could use the "RANDOMDN" variable and move your "townspawn" much father away. The "RANDOMDN" will move them from the "townspawn" marker to somewhere random within the "Area1" marker. ("RANDOMDN" being somewhere on the ground within the "Area1"). Each time they re-spawn they will be randomly placed again within "Area1". Try this. nul=[this,"Area1","townspawn", "randomdn", "move","reinforcement", "delete:",200,"respawn"] execVM "scripts\upsmon.sqf"; Edited August 5, 2013 by Beerkan Share this post Link to post Share on other sites
DChristy87 1 Posted August 5, 2013 Thanks for the awesome tip! However, I have the military range outside of Agia occupied with the EOS script and I want Agia lightly patrolled by military units. For realistic purposes I'm having the patrolling units via UPSMON respawning inside the building at the military range and then walking to their respective patrolling areas (Area1) and (Area2) which together, cover Agia. It's not really a huge issue right now or anything. Do you think I could just go into a file and lower the "no targets near" distance to say, 100 or 200 for my purposes?(would it be found in just the UPSMON.sqf or one of the other sqf's? Or would you advise not to do that? Share this post Link to post Share on other sites
SavageCDN 231 Posted August 6, 2013 Thanks for posting those updates Beerkan Share this post Link to post Share on other sites
jgaz-uk 132 Posted August 7, 2013 Many thanks for getting to grips with this beerkan:) The only error I seem to be getting these days is when first contact with a upsmon enemy squad. Think its to do with "KRON_UPS_sharedist" (also if you have "R_WHO_IS_CIV_KILLER_INFO set to 1 or on, an error shows also, but that can obviously be turned off with a 0.) ---------------------------------------------------------------------------------------------- THE ERROR; '...[]; _targetPos = [position _npc,_dir1, |#|_dis] call MON_getPos2D; File mpmissions\__cru_mp.stratis\scripts\UPSMON\common\MON_functions.sqf, line1423 if (surface...' Error undefined variable in expression: _dis Share this post Link to post Share on other sites
twisted 128 Posted August 8, 2013 thnks. i like this so very much. after quite a bit of playing i occassionally get this error. hope this info helps? if ( _surrender > 0 ) then { _surrended = cal> Error position: <_surrender > 0 ) then { _surrended = cal> Error Undefined variable in expression: _surrender File C:\Users\fam\Documents\Arma 3 - Other Profiles\2legs\missions\aaaaa.Stratis\scripts\upsmon.sqf, line 913 Error in expression < Share this post Link to post Share on other sites
ollem 4 Posted August 8, 2013 thnks. i like this so very much.after quite a bit of playing i occassionally get this error. hope this info helps? if ( _surrender > 0 ) then { _surrended = cal> Error position: <_surrender > 0 ) then { _surrended = cal> Error Undefined variable in expression: _surrender File C:\Users\fam\Documents\Arma 3 - Other Profiles\2legs\missions\aaaaa.Stratis\scripts\upsmon.sqf, line 913 Error in expression < I've seen this error too and already been working on a fix and almost have it nailed. In my case I believe the error was related to civilian AI managed by UPSMON. Could that be the case for you too? Share this post Link to post Share on other sites
DChristy87 1 Posted August 8, 2013 I'm getting the same error, I have UPSMON running on a civilian too Ollem. I hope this helps! Share this post Link to post Share on other sites