SphereCommunity
TimerCall - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: TimerCall (/Thread-TimerCall)



TimerCall - Leonidas - 12-27-2016 03:31 PM

Doesn't seem to be working. I've set it to 1, added a "serv.log Test" on [FUNCTION f_onserver_timer] and it never appears.


Code:
// Amount of items in one sector to start showing "x items too complex"
MaxSectorComplexity=2000
///1024

// Limit the number of cycles the while/for loop can proceed. Setting this to
// zero disables the limitation
MaxLoopTimes=0

// Amount of minutes to call f_onserver_timer (0 disables this, default)
TimerCall=1

// Should sphere record the time it takes to do actions like treating npcs, scripts, clients and such?
// Can be viewed by right clicking the mouse on sphere screen.
Profile=0

///////////////////////////////////////////////////////////////
//////// Magic/Effects Settings
///////////////////////////////////////////////////////////////

// Allow casting while equipped
EquippedCast=1

// Words of power for player using magic
WOPPlayer=1

// Words of power for staff using magic
WOPStaff=1

Sphere Version 0.56d-Nightly [WIN32] by http://www.spherecommunity.net, compiled at Dec 17 2016 (16:38:33)


RE: TimerCall - Coruja - 12-27-2016 06:02 PM

are you sure that you had created f_onserver_timer correctly?
it's working fine here using TimerCall=1
Code:
[FUNCTION f_onserver_timer]
SERV.LOG Testing

result:
Code:
05:50:(sphere_serv_triggers.scp,150)Testing
05:51:(sphere_serv_triggers.scp,150)Testing
05:52:(sphere_serv_triggers.scp,150)Testing
05:53:(sphere_serv_triggers.scp,150)Testing
05:54:(sphere_serv_triggers.scp,150)Testing
05:55:(sphere_serv_triggers.scp,150)Testing



RE: TimerCall - Leonidas - 12-28-2016 10:05 AM

Yeah:

Code:
[FUNCTION f_onserver_start]
// The f_onserver_start function is called on server startup.

//Serv.ServIP ip.address //Add your public IP here (not domain) if you are behind a router.
F_FEATURES



[FUNCTION f_onserver_timer]
SERV.LOG Test



[FUNCTION f_onserver_save]
// The f_onserver_save function is called before server is going to save.
// ARGN1 --> save is forced (writable)
// ARGN2 --> save stage (for backgroud save goes 1 to 6146 [sector count + 2])
// RETURN
//      0 --> normal action (save)
//      1 --> denyes save

I'm pretty sure it worked fine on 56c, now its just not working at all.


RE: TimerCall - Leonidas - 12-28-2016 04:09 PM

Well I feel stupid, just found another f_onserver_timer fuction in another script file which was the cause of this lol