Jump to content
  • 0

Error Fixing, Scheduler


Th3-Hunter333

Question

Anyone have any clue how to fix this error here that is being thrown from something related to the schedulers?

Server_rpt

Spoiler

 9:18:47 Error in expression <ickTime >= __sc_next) then {
__sc_ctx = __sc_ctx call __sc_code;
if (__sc_period>
 9:18:47   Error position: <__sc_ctx call __sc_code;
if (__sc_period>
 9:18:47   Error Undefined variable in expression: __sc_ctx

My current Sched_init is as follows
 

Spoiler


_base="z\addons\dayz_server\system\scheduler\";

call compile preprocessFileLineNumbers (_base+"sched_corpses.sqf");
call compile preprocessFileLineNumbers (_base+"sched_lootpiles.sqf");
call compile preprocessFileLineNumbers (_base+"sched_sync.sqf");
call compile preprocessFileLineNumbers (_base+"sched_safetyVehicle.sqf");
call compile preprocessFileLineNumbers (_base+"sched_lootCrates.sqf");

[
    // period    offset    code <-> ctx                init code ->ctx
     [ 60,         224,    sched_corpses ],
     [ 60,         240,    sched_lootCrates ],
     [ 300,         336,    sched_lootpiles_5m,         sched_lootpiles_5m_init ],
     [ 6,         340,    sched_lootpiles ],
     [ 900,        0,        sched_sync ],
     [ 120,        48,        sched_safetyVehicle ]
] execFSM ("z\addons\dayz_code\system\scheduler\scheduler.fsm");

//diag_log [ __FILE__, "Scheduler started"];


/*
// (see ViralZeds.hpp -> zombie_agent.fsm -> zombie_findOwner.sqf), called when a zombie becomes "local" to the server after the player disconnected
zombie_findOwner = {
    (_this select 0) call fa_deleteVehicle;
};
*/

I think where the error is coming from is from scheduler.fsm inside dayz_code/system/scheduler but i cant confirm that, This file is unedited and still remains and is being called from dayz_code.

 

Spoiler

// (c) [email protected], licensed to DayZMod for the community

class FSM {
   fsmName = "server_cleanup";
   initState = "init";
   finalStates[] = {"end"};
   class States {
      class init {
         name="init";
         init= "" \n
               //"diag_log[""Scheduler init""];" \n
               "__sc_taskArray = [];" \n
               "__sc_time = diag_tickTime;" \n
               "{" \n
               "  private [ ""__sc_period"", ""__sc_offset"", ""__sc_code"", ""__sc_init"", ""__sc_ctx"" ];" \n
               "  __sc_period = _x select 0;" \n
               "  __sc_offset = _x select 1;" \n
               "  __sc_code = _x select 2;" \n
               "  __sc_init = _x select 3;" \n
               "  __sc_ctx = if (!isNil ""__sc_init"") then { call __sc_init } else { objNull };" \n
               "  __sc_taskArray set [ count __sc_taskArray, [ __sc_code, __sc_ctx, __sc_period, __sc_time + __sc_offset - __sc_period ]];" \n
            //   "  diag_log [ __sc_period, __sc_time - __sc_offset + __sc_period, __sc_ctx, __sc_code ];" \n
               "} count _this;" \n
               "_this=nil;";
         class Links {
            class L0 {
               priority=0;
               to="loop";
               condition="1==1";
               action="";
            };
         };
      };
      class end {
         name="end";
         init= "diag_log[""Scheduler terminated""]";
         class Links {};
      };
      class loop {
         name="loop";
         init= "" \n
         //                        "diag_log[""Scheduler loop action""];" \n
               "__sc_lootT0 = diag_tickTime;" \n
               "{" \n
               "  private [ ""__sc_task"", ""__sc_period"", ""__sc_offset"", ""__sc_code"", ""__sc_next"", ""__sc_ctx"" ];" \n
               "  __sc_task = _x;" \n
               "  __sc_code = __sc_task select 0;" \n
               "  __sc_ctx = __sc_task select 1;" \n
               "  __sc_period = __sc_task select 2;" \n
               "  __sc_next = __sc_task select 3;" \n
               "  if (diag_tickTime >= __sc_next) then {" \n
             //  "     if (__sc_period>=0.2) then {diag_log['scheduler idx/period/previous/time/next', _forEachIndex, __sc_period, __sc_task select 3, diag_tickTime, __sc_next ];};" \n
               "     __sc_ctx = __sc_ctx call __sc_code;" \n
               "     if (__sc_period > 0) then { __sc_next = __sc_next + __sc_period * (1 + floor((diag_tickTime - __sc_next) / __sc_period)); };" \n
               "     __sc_task set [1, __sc_ctx];" \n
               "     __sc_task set [3, __sc_next];" \n
               "  };" \n
               "  if ((__sc_period == 0) AND {(__sc_ctx)}) exitWith {};" \n
               "  if (diag_tickTime - __sc_lootT0 > 0.02) exitWith {};" \n // hopefully should not happen frequently
               "} count __sc_taskArray;";
         class Links {
            class L0 {
               priority=1;
               to="end";
               condition="(!isServer) and {(deathHandled)}";
               action="";
            };
            class L1 {
               priority=0;
               to="loop";
               condition="1==1";
               action= "";
            };
         };
      };
   };
}; 

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Just found another error closely related to this but a little different furthur up the report, This is the exact first error that is being thrown into the rpt
 

Spoiler

21:04:30 ["z\addons\dayz_server\system\scheduler\sched_sync.sqf","TIME SYNC: Local Time set to:",[2012,8,2,16,4],"Fullmoon:",true,"Date given by HiveExt.dll:",[2020,12,23,16,4]]
21:04:30 Error in expression <) / __sc_period)); };
__sc_task set [1, __sc_ctx];
__sc_task set [3, __sc_next];>
21:04:30   Error position: <__sc_ctx];
__sc_task set [3, __sc_next];>
21:04:30   Error Undefined variable in expression: __sc_ctx

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...