[evo] dan 79 Posted January 28, 2014 Ok, I wrote a few scripts and put them into functions. They do work sometimes but for some reason, after changing nothing, the scripts stop working and give me errors. init.sqf //compile functions so they can be used via the spawn and call command (use call ingame) scuba_fnc_unitSpawns = compile preprocessFile "spawn.sqf"; scuba_fnc_ticketTracker = compile preprocessFile "EVO_Functions\ticket_tracker.sqf"; scuba_fnc_LandSpawns = compile preprocessFile "EVO_Functions\LandSpawner.sqf"; scuba_fnc_AirSpawns = compile preprocessFile "EVO_Functions\AirSpawner.sqf"; scuba_fnc_ShipSpawns = compile preprocessFile "EVO_Functions\ShipSpawner.sqf"; //locations to create triggers, these locations are the marker names that are at the center of where you want the trigger, I am also using them as a spawn point _triggerLocArray = ["agia_spawn","maxwell_spawn","farm_spawn","rogain_spawn","kamino_spawn","mike_spawn","tsou_spawn","tempest_spawn","girna_spawn","connor_spawn"]; //array of variables that will be used to store the task completion _variableArray = ["agia_spawn","maxwell_spawn","farm_spawn","rogain_spawn","kamino_spawn","mike_spawn","tsou_spawn","tempest_spawn","girna_spawn","connor_spawn"]; //loads all the old variables and checks { _Var = profileNamespace getVariable [_x, 0]; if(_Var == 0) then { //if no variable has been set, then spawn units to fill the area. [_x] spawn scuba_fnc_unitSpawns; //runs the unit spawn function } } forEach _variableArray; //create the trigger for each point, with conditions also set in here too. { _trg1 = createTrigger["EmptyDetector", getMarkerPos _x]; _trg1 setTriggerArea[500,500,0,false]; _trg1 setTriggerActivation["WEST","NOT PRESENT",true]; _trg1 setTriggerStatements["this","hint 'It worked'",""]; } forEach _triggerLocArray; [] spawn scuba_fnc_ticketTracker; //starts the ticket tracking for the whole team as the team has a pool of resources to buy vehicles [] execVM "EVO_Scripts\VehicleBuying.sqf"; //runs the script that adds all of the addActions for unit buying to the relevant boxes spawn.sqf, which is what it keeps erroring for a reason I cannot see: /* This function does hte initial spawning of the AI and gives them waypoints around their objective. By [EVO] Dan */ if(isServer) then { _Loc = _this select 0; //select the spawn location, passed as an arguement from the function being called. _group1 = createGroup west; //creates the group ready to be filled (you HAVE to do this), this sets the units side to west. //start spawning soldiers, in this case FIA fighters as our enemy "B_G_Soldier_SL_F" createUnit [getMarkerPos _Loc, _group1]; //creates a FIA squad leader and adds it to the group and spawns it at the spawn marker. "B_G_Soldier_AR_F" createUnit [getMarkerPos _Loc, _group1]; //creates a FIA Autorifleman "B_G_Soldier_F" createUnit [getMarkerPos _Loc, _group1]; //creates a FIA Rifleman "B_G_Soldier_GL_F" createUnit [getMarkerPos _Loc, _group1]; //creates a FIA Grenadier "B_G_Soldier_A_F" createUnit [getMarkerPos _Loc, _group1]; //creates a FIA ammo bearer _group = setFormation "COLUMN"; //puts the group into the column formation rather than the default one //create the units waypoints and send them on their way. The below will ensure continous random movement within the area. _wp1 = _group1 addWaypoint [getMarkerPos _Loc,350];//creates a waypoint on the spawn point _wp1 setWaypointType "MOVE"; //sets the waypoint to "Move" _wp1 setWaypointCompletionRadius 20; //sets the completion radius to 20m _wp1 setWaypointBehaviour "SAFE"; //this puts the AI into safe mode whilst on patrol _wp1 setWaypointSpeed "LIMITED"; //this puts them into slow walking more akin to actual patrol _wp2 = _group1 addWaypoint [getMarkerPos _Loc,350];//creates a waypoint on the spawn point _wp2 setWaypointType "MOVE"; //sets the waypoint to "Move" _wp2 setWaypointCompletionRadius 20; //sets the completion radius to 20m _wp3 = _group1 addWaypoint [getMarkerPos _Loc,350];//creates a waypoint on the spawn point _wp3 setWaypointType "MOVE"; //sets the waypoint to "Move" _wp3 setWaypointCompletionRadius 20; //sets the completion radius to 20m _wp4 = _group1 addWaypoint [getMarkerPos _Loc,350];//creates a waypoint on the spawn point _wp4 setWaypointType "MOVE"; //sets the waypoint to "Move" _wp4 setWaypointCompletionRadius 20; //sets the completion radius to 20m _wp5 = _group1 addWaypoint [getMarkerPos _Loc,350];//creates a waypoint on the spawn point _wp5 setWaypointType "MOVE"; //sets the waypoint to "Move" _wp5 setWaypointCompletionRadius 20; //sets the completion radius to 20m _wp6 = _group1 addWaypoint [getMarkerPos _Loc,350];//creates a waypoint on the spawn point _wp6 setWaypointType "MOVE"; //sets the waypoint to "Move" _wp6 setWaypointCompletionRadius 20; //sets the completion radius to 20m _wp7 = _group1 addWaypoint [getMarkerPos _Loc,350];//creates a waypoint on the spawn point _wp7 setWaypointType "MOVE"; //sets the waypoint to "Move" _wp7 setWaypointCompletionRadius 20; //sets the completion radius to 20m _wp8 = _group1 addWaypoint [getMarkerPos _Loc,350];//creates a waypoint on the spawn point _wp8 setWaypointType "CYCLE"; //sets the waypoint to "Cycle". This will mean the AI will continue to move around _group1 setCurrentWaypoint _wp1; //sets the first waypoint as the current one }; My rpt containing these errors which have been showing up for no apparent reason and only sometimes: Attempt to override final function - bis_functions_list Attempt to override final function - bis_functions_listpreinit Attempt to override final function - bis_functions_listpostinit Attempt to override final function - bis_functions_listrecompile Attempt to override final function - bis_fnc_missiontaskslocal Attempt to override final function - bis_fnc_missionconversationslocal Attempt to override final function - bis_fnc_missionflow Error in expression <_Loc, _group1]; _group = setFormation "COLUMN"; _wp1 = _group1 addWaypoint > Error position: <"COLUMN"; _wp1 = _group1 addWaypoint > Error Missing ; Error in expression <_Loc, _group1]; _group = setFormation "COLUMN"; _wp1 = _group1 addWaypoint > Error position: <"COLUMN"; _wp1 = _group1 addWaypoint > Error Missing ; Error in expression <_Loc, _group1]; _group = setFormation "COLUMN"; _wp1 = _group1 addWaypoint > Error position: <"COLUMN"; _wp1 = _group1 addWaypoint > Error Missing ; Error in expression <_Loc, _group1]; _group = setFormation "COLUMN"; _wp1 = _group1 addWaypoint > Error position: <"COLUMN"; _wp1 = _group1 addWaypoint > Error Missing ; Error in expression <_Loc, _group1]; _group = setFormation "COLUMN"; _wp1 = _group1 addWaypoint > Error position: <"COLUMN"; _wp1 = _group1 addWaypoint > Error Missing ; Error in expression <_Loc, _group1]; _group = setFormation "COLUMN"; _wp1 = _group1 addWaypoint > Error position: <"COLUMN"; _wp1 = _group1 addWaypoint > Error Missing ; Error in expression <_Loc, _group1]; _group = setFormation "COLUMN"; _wp1 = _group1 addWaypoint > Error position: <"COLUMN"; _wp1 = _group1 addWaypoint > Error Missing ; Error in expression <_Loc, _group1]; _group = setFormation "COLUMN"; _wp1 = _group1 addWaypoint > Error position: <"COLUMN"; _wp1 = _group1 addWaypoint > Error Missing ; Error in expression <_Loc, _group1]; _group = setFormation "COLUMN"; _wp1 = _group1 addWaypoint > Error position: <"COLUMN"; _wp1 = _group1 addWaypoint > Error Missing ; Error in expression <_Loc, _group1]; _group = setFormation "COLUMN"; _wp1 = _group1 addWaypoint > Error position: <"COLUMN"; _wp1 = _group1 addWaypoint > Error Missing ; Error in expression <_Loc, _group1]; _group = setFormation "COLUMN"; _wp1 = _group1 addWaypoint > Error position: <"COLUMN"; _wp1 = _group1 addWaypoint > Error Missing ; Error in expression <_Loc, _group1]; _group = setFormation "COLUMN"; _wp1 = _group1 addWaypoint > Error position: <"COLUMN"; _wp1 = _group1 addWaypoint > Error Missing ; Error in expression <_Loc, _group1]; _group = setFormation "COLUMN"; _wp1 = _group1 addWaypoint > Error position: <"COLUMN"; _wp1 = _group1 addWaypoint > Error Missing ; Error in expression <_Loc, _group1]; _group = setFormation "COLUMN"; _wp1 = _group1 addWaypoint > Error position: <"COLUMN"; _wp1 = _group1 addWaypoint > Error Missing ; Error in expression <_Loc, _group1]; _group = setFormation "COLUMN"; _wp1 = _group1 addWaypoint > Error position: <"COLUMN"; _wp1 = _group1 addWaypoint > Error Missing ; Error in expression <_Loc, _group1]; _group = setFormation "COLUMN"; _wp1 = _group1 addWaypoint > Error position: <"COLUMN"; _wp1 = _group1 addWaypoint > Error Missing ; Error in expression <_Loc, _group1]; _group = setFormation "COLUMN"; _wp1 = _group1 addWaypoint > Error position: <"COLUMN"; _wp1 = _group1 addWaypoint > Error Missing ; Error in expression <_Loc, _group1]; _group = setFormation "COLUMN"; _wp1 = _group1 addWaypoint > Error position: <"COLUMN"; _wp1 = _group1 addWaypoint > Error Missing ; Error in expression <_Loc, _group1]; _group = setFormation "COLUMN"; _wp1 = _group1 addWaypoint > Error position: <"COLUMN"; _wp1 = _group1 addWaypoint > Error Missing ; Error in expression <_Loc, _group1]; _group = setFormation "COLUMN"; _wp1 = _group1 addWaypoint > Error position: <"COLUMN"; _wp1 = _group1 addWaypoint > Error Missing ; Error in expression <_Loc, _group1]; _group = setFormation "COLUMN"; _wp1 = _group1 addWaypoint > Error position: <"COLUMN"; _wp1 = _group1 addWaypoint > Error Missing ; Error in expression <_Loc, _group1]; _group = setFormation "COLUMN"; _wp1 = _group1 addWaypoint > Error position: <"COLUMN"; _wp1 = _group1 addWaypoint > Error Missing ; Error in expression <nceShipTickets"; _startLandTickets = _landTickets + 100; _startAirTickets = _> Error position: <_landTickets + 100; _startAirTickets = _> Error Undefined variable in expression: _landtickets Like I said, everything else works, and sometimes this works, but unfortunately it sometimes just stops working altogether with that script. ---------- Post added at 10:48 PM ---------- Previous post was at 10:39 PM ---------- Nevermind, found the problem, I put _group1 = setFormation "COLUMN"; in wrong, its meant to be _group1 setFormation "COLUMN"; Share this post Link to post Share on other sites