Bug #355
openAmal XS() & YS() report Nan
0%
Description
The below code prints NaN for both variable (tested the same code on Amos and it prints the screen coords of the mouse pointer as expected):
#manifest:"Amiga"
#fullScreen:true
#splashScreen:false
screen open 0,340,256,16,lowres
curs off:flash off: cls 0
colour 1,$005
ink 2
bar 0,0 to 16,16
get bob 1,0,0 to 32,32
cls 1
bob 1,100,100,1
a$="L: Let R0 = XS(0,XM) ; L R1=YS(0,YM) ; P JL"
amal 1,a$
channel 1 to bob 1
amal on 1
Repeat
cls 1
home
print amreg(1,0), amreg(1,1)
wait vbl
Until mouse click
(It prints the hardware coords fine if you change the amal string to a$="L: Let R0 = XM ; L R1=YM ; P JL" )
Updated by Brian Flanagan about 4 years ago
- Assignee set to Francois Lionet
- Estimated time set to 4:00 h
- Affected version changed from 0.9.8.1 to Beta RC2
Attempted to test in Beta RC2, but would not run due to another error.
(Animation channel not opened...)
Updated by Brian Flanagan about 4 years ago
- Priority changed from Normal to High
Updated by Brian Flanagan about 4 years ago
- Affected version changed from Beta RC2 to Beta RC3
This is still broken in RC3.
Updated by Brian Flanagan about 3 years ago
- Affected version changed from Beta RC3 to 1.0.0 (B10) u16
Still broken in 1.0.0 (B10) u16 (9/25)
It's actually worse now. It doesn't even get as far as the Repeat loop.
Now it gets infinite Guru at the Amal 1,a$ (before Amal was turned on, or the channel number was set.)
This error occurs:
/Users/brian/Documents/My%20AOZ%20Applications/Bug355/html/run/raoz.js:1297 Cannot read property 'channelNumber' of undefined
/Users/brian/Documents/My%20AOZ%20Applications/Bug355/html/run/raoz.js:1298 TypeError: Cannot read property 'channelNumber' of undefined
at AMAL.runChannel (/Users/brian/Documents/My%20AOZ%20Applications/Bug355/html/run/ramal.js:129)
at AOZ.amalStart (/Users/brian/Documents/My%20AOZ%20Applications/Bug355/html/run/raoz.js:5811)
at AOZ.runBlocks (/Users/brian/Documents/My%20AOZ%20Applications/Bug355/html/run/raoz.js:1112)
at AOZ.doUpdate (/Users/brian/Documents/My%20AOZ%20Applications/Bug355/html/run/raoz.js:532)
at /Users/brian/Documents/My%20AOZ%20Applications/Bug355/html/run/raoz.js:768
It then repeatedly gets this error:
/Users/brian/Documents/My%20AOZ%20Applications/Bug355/html/run/raoz.js:1297 Cannot read property 'call' of undefined
/Users/brian/Documents/My%20AOZ%20Applications/Bug355/html/run/raoz.js:1298 TypeError: Cannot read property 'call' of undefined
at AOZ.runBlocks (/Users/brian/Documents/My%20AOZ%20Applications/Bug355/html/run/raoz.js:975)
at AOZ.doUpdate (/Users/brian/Documents/My%20AOZ%20Applications/Bug355/html/run/raoz.js:532)
at /Users/brian/Documents/My%20AOZ%20Applications/Bug355/html/run/raoz.js:768
If I move Channel 1 To Bob 1 before Amal 1,a$ it it still fails.
It just gets a different error when it hits the Amal On statement.
That error causes an infinite guru as well.
It gets the following error repeatedly:
/Users/brian/Documen…ml/run/raoz.js:1297 Cannot read property 'x' of undefined
/Users/brian/Documen…ml/run/raoz.js:1298 TypeError: Cannot read property 'x' of undefined
at AOZ.xScreen (/Users/brian/Documen…ml/run/raoz.js:4062)
at AMALChannel1.blocks.<computed> (<anonymous>:11:37)
at AMALChannel.updateBlocks (/Users/brian/Documen…ml/run/ramal.js:409)
at AMALChannel.update (/Users/brian/Documen…ml/run/ramal.js:337)
at AMAL.doSynchro (/Users/brian/Documen…ml/run/ramal.js:172)
at AOZ.doSynchro (/Users/brian/Documen…ml/run/raoz.js:1469)
at onHalt (/Users/brian/Documen…tml/run/raoz.js:654)