Tickcount resets at ~4300
#1

Hello, I just uploded my GM on host and I found out that this code:
PHP код:
#include <a_samp>
main()
{
    
SetTimer("func"51);
    return 
1;
}
forward func();
public 
func()
{
    
printf("%i"tickcount());
    return 
1;

gives this results:

Quote:

[09:58:27] 4260
[09:58:27] 4260
[09:58:27] 4260
[09:58:27] 4260
[09:58:27] 4260
[09:58:27] 4260
[09:58:27] 4260
[09:58:27] 4260
[09:58:27] 4260
[09:58:27] 4260
[09:58:27] 4260
[09:58:27] 4260
[09:58:27] 4260
[09:58:27] 4260
[09:58:27] 4260
[09:58:27] 4260
[09:58:27] 4260
[09:58:27] 4260
[09:58:27] 4260
[09:58:27] 4260
[09:58:27] 4260
[09:58:27] 4280
[09:58:27] 4280
[09:58:27] 4280
[09:58:27] 4280
[09:58:27] 4280
[09:58:27] 4280
// A lot of 4280
[09:58:28] 4280
[09:58:28] 4280
[09:58:28] 4280
[09:58:28] 4280
[09:58:28] 4280
[09:58:28] 4280
[09:58:28] 4280
[09:58:28] 4280
[09:58:28] 4280
[09:58:28] 4280
[09:58:28] 4280
[09:58:28] 4280
[09:58:28] 4280
[09:58:28] 4280
[09:58:28] 4280
[09:58:28] 4280
[09:58:28] 4280
[09:58:28] 4280
[09:58:28] 4280
[09:58:28] 4280
[09:58:28] 4280
[09:58:28] 5

You can see that it does not increment with 5 units and after 4280 it goes back to 0.

I fixed it with
Код:
#define tickcount() GetTickCount()
which works fine, but why tickcount is counting like this?
Reply
#2

Bump?
Reply
#3

http://forum.sa-mp.com/showpost.php?...04&postcount=3
Reply
#4

Thank you!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)