• 0
Takuyakii

Bug Negative Countdown

Question

Hi! i need help for this. 

 

after 24 hours the timer go count again negatively.

 

See pic below. and no error on map.

 

set .Hour,24;
if(gettimetick(2) - #dailytimer < ( .Hour * 3600)) {
mes [email protected]$;


		set [email protected],#dailytimer - gettimetick(2);
		set [email protected], [email protected] % ( 24 * 3600 ) / 3600;
		set [email protected], [email protected] % ( 24 * 3600 ) % 3600 / 60;
		set [email protected], [email protected] % ( 24 * 3600 ) % 3600 % 60;
		mes "You have to wait for your next delivery.";
		mes "Time CountDown : ^FF0000"[email protected]+":"[email protected]+":"[email protected]+"^000000";
close;
}


mes [email protected]$;
mes "Congrats!";
mes " ";
mes "Here's your reward 1 Activity Point!(s)";
mes "Check your Chat-Log!";
++#activity_points;
dispbottom "You've gained one Activity Point! Your total is ["+#activity_points+"] Activity point(s).";
set #dailytimer,gettimetick(2) + ( .Hour * 3600 );

 

bug.png

Edited by Takuyakii

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

If you could post your whole script, i will fix it for you.

Share this post


Link to post
Share on other sites
  • 0
12 hours ago, Takuyakii said:

Hi! i need help for this. 

 

after 24 hours the timer go count again negatively.

 

See pic below. and no error on map.

 

set .Hour,24;
if(gettimetick(2) - #dailytimer < ( .Hour * 3600)) {
mes [email protected]$;


		set [email protected],#dailytimer - gettimetick(2);
		set [email protected], [email protected] % ( 24 * 3600 ) / 3600;
		set [email protected], [email protected] % ( 24 * 3600 ) % 3600 / 60;
		set [email protected], [email protected] % ( 24 * 3600 ) % 3600 % 60;
		mes "You have to wait for your next delivery.";
		mes "Time CountDown : ^FF0000"[email protected]+":"[email protected]+":"[email protected]+"^000000";
close;
}


mes [email protected]$;
mes "Congrats!";
mes " ";
mes "Here's your reward 1 Activity Point!(s)";
mes "Check your Chat-Log!";
++#activity_points;
dispbottom "You've gained one Activity Point! Your total is ["+#activity_points+"] Activity point(s).";
set #dailytimer,gettimetick(2) + ( .Hour * 3600 );

 

bug.png

Post your whole script. We'll fix it for you.

Share this post


Link to post
Share on other sites
  • 0
if(gettimetick(2) - #dailytimer < ( .Hour * 3600)) {

change to

if(#dailytimer > gettimetick(2)) {

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...