SA-MP Forums Archive
Tickcount resets at ~4300 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Tickcount resets at ~4300 (/showthread.php?tid=646813)



Tickcount resets at ~4300 - GaByM - 24.12.2017

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?


Re: Tickcount resets at ~4300 - GaByM - 26.12.2017

Bump?


Re: Tickcount resets at ~4300 - StrikerZ - 26.12.2017

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


Re: Tickcount resets at ~4300 - GaByM - 26.12.2017

Thank you!