I've noticed a few oddities in Time over the last months of testing stuff. I thought it was time to get professional help on them.
1. I cannot get the game to start at anything but 8am, no matter to what time I set the module properties start time.
2. Upon logging in with a test PC, I get the ACR message that the PC is being adjusted for a quite widely varying amount of time off the server. It could be 1 day or it could be 50 and it seems to bear little relation to how long the PC has actually been off the server.
3. I have a function that sends NPCs home to their spawn point one game hour before they despawn. I have tried both GetTimeHour() and ACR_GetTimeStampByHour(FALSE) to identify nHour. Both seem to pull a random integer to assign to Time.
<a href="http://imageshack.us"><img src="http://img90.imageshack.us/img90/7499/timeerrordd7.jpg" border="0" alt="Image Hosted by ImageShack.us"></a><br>
Time After Time
Moderators: ALFA Administrators, Staff - Technical
Time After Time
Enjoy the game
- AcadiusLost
- Chosen of Forumamus, God of Forums
- Posts: 5061
- Joined: Tue Oct 19, 2004 8:38 am
- Location: Montara, CA [GMT -8]
- Contact:
The persistent server time via the ACR is determined by a timestamp that is written every few minutes to the MySQL database. For live servers this would be the central SQL server, so all servers could be synchronized for time, or a module that switched hosts would come back up with the correct time.
I suspect you're working on a local MySQL database for your test module (host: localhost in xp_mysql.ini ?)- in any case, it's checking the last logoff timestamp against the stored server time, which is synced up with the MySQL database last stored time OnModuleLoad (which is why the module properties don't allow you to change the starting time). If you're connecting to the central DB, it's possible you're reading the server time from the proper 003 Beta module I'm hosting- depends how you have your module tag and information set up in acr_settings_i.nss.
Not sure on the GetTime() results- have you tried comparing them to the "Check Time" option in Heed's PC tools?
I suspect you're working on a local MySQL database for your test module (host: localhost in xp_mysql.ini ?)- in any case, it's checking the last logoff timestamp against the stored server time, which is synced up with the MySQL database last stored time OnModuleLoad (which is why the module properties don't allow you to change the starting time). If you're connecting to the central DB, it's possible you're reading the server time from the proper 003 Beta module I'm hosting- depends how you have your module tag and information set up in acr_settings_i.nss.
Not sure on the GetTime() results- have you tried comparing them to the "Check Time" option in Heed's PC tools?