Raised This Month: $ Target: $400
 0% 

/time countdown


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-29-2022 , 19:27   Re: /time countdown
Reply With Quote #9

@EFFx,
  • According to the formatex() documentation, using the output string as an input is not allowed. But, I'm assuming you're not getting any errors so in this one specific case, it may work. As far as I have seen, the proper way to append with formatex() is the way that I've done it in my plugin above.
  • You actually have a potential overflow error because you're using iLen which is an input to effectively index a hard coded array inside the function (i.e. szMessageFmt). Simply remove szMessageFmt entirely and use szMessage directly.
  • The way you calculate each of the time units requires more operations than the way that I do it though it's unlikely to cause any significant performance hit.
__________________
fysiks is offline
 



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

Forum Jump


All times are GMT -4. The time now is 10:32.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode