Project

General

Profile

Actions

Bug #236

closed

Assigning value to Timer

Added by Paul Kitching almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
02/15/2020
Due date:
% Done:

0%

Estimated time:
Affected version:

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.

Actions #1

Updated by Paul Kitching almost 5 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.

Actions #2

Updated by Francois Lionet over 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.

Actions #3

Updated by Baptiste Pillot over 4 years ago

  • Description updated (diff)

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)
Actions #4

Updated by Baptiste Pillot over 4 years ago

  • Status changed from Resolved to Feedback
Actions #5

Updated by Paul Kitching over 4 years ago

  • Status changed from Feedback to Closed

All seems to be working now in both Amiga and PC mode.

Actions

Also available in: Atom PDF