SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Thread Tools Display Modes
Old 26/09/2018, 02:25 PM   #1
Huge Clucker
v1k1nG's Avatar
Join Date: Feb 2018
Posts: 412
Reputation: 31
Default tickcount() overflow question
"this count overflows after approximately 24 days of continuous operation"

Does this mean I have to reset tickcount's variable value before 24 days?
v1k1nG is offline   Reply With Quote
Old 26/09/2018, 02:38 PM   #2
Beta Tester
Y_Less's Avatar
Join Date: Jun 2008
Location: 629 -
Posts: 15,457
Reputation: 3206
Default Re: tickcount() overflow question

No. This is only a problem if you COMPARE times over 24 days. So if you do:

`if (time1 > time2)`

And there was more than 24 days between the two times it might be wrong. Also, given the wrap-around, the correct way to compare the times is:

`if (time1 - time2 > 0)`
Y_Less is online now   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ajuda] GetTickCount e tickcount minimessi10 Português/Portuguese 3 21/04/2015 09:30 PM
tickcount() problem Sarra Scripting Help 1 18/08/2014 07:43 PM
tickcount alternatives hbzi Scripting Help 5 18/06/2013 07:26 PM
GetTickCount or tickcount? Miguel Help Archive 4 12/10/2010 12:35 AM
TickCount Riaz Русский/Russian 18 02/04/2010 05:21 PM

All times are GMT. The time now is 02:28 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.