24.12.2017, 07:07
(
Последний раз редактировалось GaByM; 26.12.2017 в 05:32.
)
Hello, I just uploded my GM on host and I found out that this code:
gives this results:
You can see that it does not increment with 5 units and after 4280 it goes back to 0.
I fixed it with
which works fine, but why tickcount is counting like this?
PHP код:
#include <a_samp>
main()
{
SetTimer("func", 5, 1);
return 1;
}
forward func();
public func()
{
printf("%i", tickcount());
return 1;
}
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 |
I fixed it with
Код:
#define tickcount() GetTickCount()