Register for your free account! | Forgot your password?


You last visited: Today at 10:23

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Problem with Time32

Discussion on Problem with Time32 within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2010
Posts: 223
Received Thanks: 23
Problem with Time32

I guess this is what I get for copying Impluse's Time packet ><
I'm getting an error in my console saying:

"The last value of Time32.Now was greater than the current value generated during this call. This is likely due to a reset in the 49.71 days period. See timeGetTime Function (Windows) for more information."

It says it way too often. Maybe every few minutes if not every other minute. If you're not familiar with Impluse's time32 packet, this is what it looks like (taken from Impluse's source so it's easier to understand!):

PHP Code:
public struct Time32
    
{
        private 
uint value;
        private static 
uint lastValue;
        private const 
string nowDebug =
            
"The last value of Time32.Now was greater than the current value generated during this call. " +
            
"This is likely due to a reset in the 49.71 days period. " +
            
"See http://msdn.microsoft.com/en-us/library/dd757629(VS.85).aspx for more information.";

        public static 
Time32 Now
        
{
            
get
            
{
                
Time32 current timeGetTime();
                if (
lastValue current.value)
                    throw new 
InvalidOperationException(nowDebug);
                
lastValue current.value;
                return 
current;
            }
        }

        public 
Time32(int Value)
        {
            
value = (uint)Value;
        }
        public 
Time32(uint Value)
        {
            
value = (uint)Value;
        }
        public 
Time32(long Value)
        {
            
value = (uint)Value;
        }

        public 
Time32 AddMilliseconds(int Amount)
        {
            return new 
Time32(this.value Amount);
        }
        public 
Time32 AddSeconds(int Amount)
        {
            return 
AddMilliseconds(Amount 1000);
        }
        public 
Time32 AddMinutes(int Amount)
        {
            return 
AddSeconds(Amount 60);
        }
        public 
Time32 AddHours(int Amount)
        {
            return 
AddMinutes(Amount 60);
        }
        public 
Time32 AddDays(int Amount)
        {
            return 
AddHours(Amount 24);
        }

        public 
override bool Equals(object obj)
        {
            if (
obj is Time32)
                return ((
Time32)obj == this);
            return 
base.Equals(obj);
        }
        public 
override string ToString()
        {
            return 
value.ToString();
        }
        public 
override int GetHashCode()
        {
            return (int)
value;
        }

        public static 
bool operator ==(Time32 t1Time32 t2)
        {
            return (
t1.value == t2.value);
        }
        public static 
bool operator !=(Time32 t1Time32 t2)
        {
            return (
t1.value != t2.value);
        }
        public static 
bool operator >(Time32 t1Time32 t2)
        {
            return (
t1.value t2.value);
        }
        public static 
bool operator <(Time32 t1Time32 t2)
        {
            return (
t1.value t2.value);
        }
        public static 
bool operator >=(Time32 t1Time32 t2)
        {
            return (
t1.value >= t2.value);
        }
        public static 
bool operator <=(Time32 t1Time32 t2)
        {
            return (
t1.value <= t2.value);
        }
        [
DllImport("winmm.dll")]
        public static 
extern Time32 timeGetTime(); 
Help is greatly appreciated! Thank you! =]
Sincerely,
Fang
-Fáng- is offline  
Old 09/08/2010, 12:15   #2
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,124
Received Thanks: 2,514
Why do you need any of that?
Korvacs is offline  
Old 09/08/2010, 14:06   #3
 
elite*gold: 0
Join Date: Jun 2010
Posts: 118
Received Thanks: 23
I'm having same problem .
~Master is offline  
Old 09/08/2010, 17:44   #4
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,220
Received Thanks: 867
It's not a packet btw.
_DreadNought_ is offline  
Old 09/08/2010, 17:47   #5
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,124
Received Thanks: 2,514
Indeed, doesnt have anything packet related in it, but why would you need any of that?
Korvacs is offline  
Old 09/08/2010, 18:14   #6
 
elite*gold: 0
Join Date: Jul 2010
Posts: 223
Received Thanks: 23
I need it because of the miliseconds and seconds. I know that seems stupid but I need it for an event that I'm going to make on my server. I called it a packet because it collects information and executes a function. I'm self taught so give me a break. #00 << If you know what that means in Conquer than good for you =]

EDIT: Wait... I'm being stupid... I can just use DateTime... lol
-Fáng- is offline  
Reply


Similar Threads Similar Threads
Having problem Wierd problem with [GUIDE-DETIALED] How to setup a server!
02/10/2010 - EO PServer Hosting - 1 Replies
Hellow, I just used this guide, to set up an EO private server. Everything is correct, but my AccountServer Keeps bugging. Can someOne help me ( via TeamViewer, .. ) ? Thnx, Greets Joris
[Problem] Problem with server starting - cannot find quest index for PaxHeader
12/22/2009 - Metin2 Private Server - 1 Replies
Hello! I have this same problem as here when i'm starting my server: http://www.elitepvpers.com/forum/metin2-pserver-di scussions-questions/307143-metin2-serverfiles-ques t-index-fehler.html But I didn't know the answer.. how to repair this? Greetings



All times are GMT +2. The time now is 10:23.


Powered by vBulletin®
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2021 elitepvpers All Rights Reserved.