TMREAD stops working if home button is pressed
Root / Programming Questions / [.]
ahavasandwichCreated:
I noticed that TMREAD stops working after the home button is pressed. This will be a problem if someone tries to take a miiverse screenshot of a game that uses this command.
My apologies. I should have added some code. :P
I was using the code below for a timer as part of the WarioWare project thing.
TMREAD TIME$ OUT H_I,M_I,S_I TIME_I=(H_I*3600)+(M_I*60)+S_I @LOOP TMREAD TIME$ OUT H_F,M_F,S_F TIME_F=(H_F*3600)+(M_F*60)+S_F TOTAL_TIME=TIME_F-TIME_I ?TOTAL_TIME,TIME,F-TIME_IThe total time shouldn't go higher than 3 based on some timer reset code.
I just figured out the problem.This timer uses the system clock by first establishing an initial time and then some final time. The problem with this is that the clock is still running when you pause via the home screen. I think I’ll go back to using old fashion CNT=CNT+1 timers.
Woah, didn't know you could do that with FORMAT. Multiple variables huh? Very useful.
I just figured out the problem.This timer uses the system clock by first establishing an initial time and then some final time. The problem with this is that the clock is still running when you pause via the home screen. I think I’ll go back to using old fashion CNT=CNT+1 timers.Yes unfortunately time won't stop just for your timer lol. You can actually use this as a clever way to find out when somebody has opened their 3ds or pressed the home button.
Good idea. I'll create some code that prevents cheating by pausing with the home button. I'm turning into a Mr. Resetti. Some good came out of this. XD
I just figured out the problem.This timer uses the system clock by first establishing an initial time and then some final time. The problem with this is that the clock is still running when you pause via the home screen. I think I’ll go back to using old fashion CNT=CNT+1 timers.Wait, you can just use MAINCNT instead.... (or MILLISEC now)
Thanks for the information. I'll check it out during the holiday break next week.