Dodgy code or me!
Monkey Forums/Monkey Programming/Dodgy code or me!
| ||
Can someone please tell me what wrong with this code: Why doesnt it display "DONE!"? Thanks! |
| ||
I'd guess because it's taking longer than a second to get between your OnCreate() startTime recording and where you test in OnUpdate() with this:If Millisecs() - startTime >= 1000 preCache = 1 End Which means that preCache is never '2' and so you are never 'done'. |
| ||
The strange thing is that if you run the code, it actually displays "2" on screen!?!?! And if you add a Print statement: Method OnRender:Int() Cls If preCache = 1 preCache = 2 Print preCache End It always prints out 2.... forever, even though the check is preCache = 1!?!?!??!?! |
| ||
Yeah, but that's in the OnRender just after you set it to 2. You're setting "done" in the OnUpdate and it's never 2 at that point because it always falls into the check I quoted above and sets preCache to 1. |
| ||
DUUUUUUUUUUURRRRRRRRRRRRRRRRRRRRRRRR!!! Dont mind me.................... nothing to see here!!!! Thanks Muddy Shoes! |