Bug #236
Assigning value to Timer
0%
Description
#splashScreen:false timer=2.7 print timer
This doesn't print 2.7, it prints -0.054. It's the same type of thing assigning any number I've tried. I always get a negative number. In AMOS you can assign a number and it works, though AMOS worked in integers. If you have a timer running and pause your game, you can't then reset it back to the value when your game resumes.
Updated by Paul Kitching about 4 years ago
Assigning 50 to it returns -1 when you print it, if that helps work out what's happening. 50 being 1 second in Amiga mode, rather than 1000 in PC mode.
Updated by Francois Lionet about 4 years ago
- Status changed from New to Resolved
- Target version set to 0.9.5
Fixed. And remember:
IN Amiga mode, Timer, and Wait are in 1/50th of second and are integers.
In PC mode, Timer and Wait are in SECONDS and are floating-point numbers.
Updated by Baptiste Pillot about 4 years ago
- Description updated (diff)
- source : https://www.amos2.fr/ide/Amos2/Ide/Program/489
- run : https://www.amos2.fr/run/tickleman/236
- #manifest:"pc":
- result when assigning 2.7 : 2.7
- result when assigning 50 : 50
- #manifest:"amiga"
- both turn into a Guru Meditation
Still a problem in amiga non, no ? (v0.9.6)
Console says :
Cannot read property 'loChar' of undefined aoz.js:418 TypeError: Cannot read property 'loChar' of undefined at Fonts.getAmigaCharacter (fonts.js:440) at Fonts.drawAmigaText (fonts.js:428) at TextWindow.printLine (textwindow.js:1648) at TextWindow.print (textwindow.js:1282) at Application.blocks.<computed> (application.js:42) at doUpdate (aoz.js:405)
Updated by Paul Kitching about 4 years ago
- Status changed from Feedback to Closed
All seems to be working now in both Amiga and PC mode.