SA-MP Forums Archive
GetTickCount() has a negative value. - 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: GetTickCount() has a negative value. (/showthread.php?tid=531222)



GetTickCount() has a negative value. - Blast3r - 11.08.2014

Hey, Whenever I use GetTickCount(), it gives me a negative value. Also tickcount() gives me a high value but tickcount() should represent the time the SA-MP server was online. I know that a negative number on GetTickCount occurs when you've kept your computer on for a long time, but I never ever exceeded that limit. GetTickCount and tickcount both just don't reset. Anybody knows how to fix this?


Re: GetTickCount() has a negative value. - codectile - 11.08.2014

Show the code ..


Re: GetTickCount() has a negative value. - Blast3r - 11.08.2014

Doesn't matter what the code is, GetTickCount just returns a negative value value and tickcount a very high value.

And to check that I just used a command which puts the results to a format and then send it to the player


Re: GetTickCount() has a negative value. - iFarbod - 11.08.2014

Which OS? Linux? Windows?
Try to use both tickcount() and GetTickCount() in a mode without anything in that OS.
timertest.pwn/amx is the best practice.
...

Quote:

Show the code ..

It doesn't matter. Problem is GetTickCount() returning a negative value.


Re: GetTickCount() has a negative value. - Blast3r - 11.08.2014

Quote:
Originally Posted by iFarbod
Посмотреть сообщение
Which OS? Linux? Windows?
Try to use both tickcount() and GetTickCount() in a mode without anything in that OS.
timertest.pwn/amx is the best practice.
...


It doesn't matter. Problem is GetTickCount() returning a negative value.
W8.1 only doesn't work on my own computer.


Re: GetTickCount() has a negative value. - Jessyy - 11.08.2014

Fix for your problem is 'It doesn't matter. problem is your code not GetTickCount()' (i just tested GetTickCount o my computer works fine)


Re: GetTickCount() has a negative value. - Blast3r - 11.08.2014

Quote:
Originally Posted by Jessyy
Посмотреть сообщение
Fix for your problem is 'It doesn't matter. problem is your code not GetTickCount()' (i just tested GetTickCount o my computer works fine)
The code is running on all other computers and gives just an integer above 0, but it doesn't on my own computer. It returns a negative integer. Please don't say anything if you don't even know what's wrong.


Re: GetTickCount() has a negative value. - iFarbod - 11.08.2014

Please test it with timertest gamemode, it's in SA-MP Server Package. Then Show the log.


Re: GetTickCount() has a negative value. - Kar - 11.08.2014

https://github.com/Southclaw/Scaveng...ckcountfix.pwn


Re: GetTickCount() has a negative value. - Blast3r - 11.08.2014

Quote:
Originally Posted by Kar
Посмотреть сообщение
Is there any way to reset the GetTickCount itself instead of making a workaround? As I already have a workaround similiar to this one.