I've almost become suicidal over this script. What am I doing wrong? The object here is that all terrain objects within the "markx" markers (they are ellipses) will be hidden. This works fine and dandy in SP (play scenario through the Editor) but will not work in a dedicated server environment.
init.sqf
// Removing map objects script
_removeObjects = compile loadFile "\scripts\removeMapObjects.sqf";
_null = [["mark1","mark2","mark3","mark4","mark5","mark6","mark7","mark8","mark9","mark10","mark11","mark12","mark13","mark14","mark15","mark16","mark17","mark18","mark19"], "_removeObjects", false, true] call BIS_fnc_MP;
removeMapObjects.sqf
_markerArray = _this select 0;
{
_terrainobjects = nearestTerrainObjects [(getMarkerPos _x),[],(getMarkerSize _x)select 0];
{hideObjectGlobal _x} forEach _terrainobjects;
}forEach _markerArray;