Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   timevar2 (serverside) (https://forums.graalonline.com/forums/showthread.php?t=84818)

cbk1994 03-24-2009 09:55 PM

timevar2 (serverside)
 
It seems totally random, it's off by about 30 minutes from what it should (assuming it is supposed to match with Unix epoch time, which it is).

It also seems to go back and forth from time to time

WhiteDragon 03-24-2009 11:18 PM

It's because it sometimes gets off when the server lags or is down.

And it can't update regularly because a lot of scripts are based off of timevar2 and therefore if it changed any other way besides 1 per second it would glitch a lot of scripts up.

At least that's the explanation Stefan gave to me when I asked him awhile back.

cbk1994 03-25-2009 12:08 AM

Quote:

Originally Posted by WhiteDragon (Post 1477512)
It's because it sometimes gets off when the server lags or is down.

And it can't update regularly because a lot of scripts are based off of timevar2 and therefore if it changed any other way besides 1 per second it would glitch a lot of scripts up.

At least that's the explanation Stefan gave to me when I asked him awhile back.

It's supposed to be the number of seconds since January 1st, 1970. There is no reason that it shouldn't increase/decrease on server start to the correct value. If it doesn't do so, it will produce an incorrect time, which could be bad.

I also don't really see how changing it to the correct time would glitch scripts. Seems like scripts would glitch a lot more if they thought it was time 'x', then it later became time 'x' minus a few minutes.


All times are GMT +2. The time now is 07:28 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.