This is pure speculation,
try moving the
AddTimer("Update", 2.0f, "Update");
above the rest of the code in the Update function.
void Update(string &in asTimer)
{
AddTimer("Update", 2.0f, "Update");
playerIsRunning = (GetPlayerSpeed() > 3) ? true : false;
if(playerIsRunning)
{
//AddDebugMessage("Current main time divider: "+mainTimeDivider+"", false);
if(mainTimeDivider == 10){
//Do nothing
}
else
{
mainTimeDivider++;
}
}
else
{
//AddDebugMessage("Current main time divider: "+mainTimeDivider+"", false);
if(mainTimeDivider == 0){
//Do nothing
}
else
{
mainTimeDivider--;
}
}
AddDebugMessage("Current main time divider: "+mainTimeDivider+"", false);
}