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


Messages In This Thread
Tickcount resets at ~4300 - by GaByM - 24.12.2017, 07:07
Re: Tickcount resets at ~4300 - by GaByM - 26.12.2017, 05:33
Re: Tickcount resets at ~4300 - by StrikerZ - 26.12.2017, 05:39
Re: Tickcount resets at ~4300 - by GaByM - 26.12.2017, 06:01

Forum Jump:


Users browsing this thread: 1 Guest(s)