09-10-2025, 05:06 PM
I was able to get a version that would work for you @Pete, but you did find a couple of additional compatibility issues.
First, the error you were seeing was due to the same issue that @bplus was having with the Mid$ statement. This has been fixed in the dev server but hasn't been pushed up to qbjs.org just yet.
Running it in the dev server I did find a couple of additional issues that were preventing it from working correctly. First, I have not yet implemented the screen 0 behavior for the _Width and _Height methods. (I'll add a ticket to support that in the next release.) At present, they always return the sizing information in pixels rather than characters. Next, QBJS does not yet have support for defining multiple variations of the same variable name that differ only by type. So, it didn't like the fact that a$ was being used for both a string and as a separate array.
Here's a version that works on the dev server by using a little QBJS trick to define _Width and _Height as varaibles and redefining the string variable as s$:
Pete's Mini Space Invaders For QBJS
To use the QBJS embed tag you'll want to use the share link that is generated from the QBJS IDE instead of the full source file. It will look something like this:
First, the error you were seeing was due to the same issue that @bplus was having with the Mid$ statement. This has been fixed in the dev server but hasn't been pushed up to qbjs.org just yet.
Running it in the dev server I did find a couple of additional issues that were preventing it from working correctly. First, I have not yet implemented the screen 0 behavior for the _Width and _Height methods. (I'll add a ticket to support that in the next release.) At present, they always return the sizing information in pixels rather than characters. Next, QBJS does not yet have support for defining multiple variations of the same variable name that differ only by type. So, it didn't like the fact that a$ was being used for both a string and as a separate array.
Here's a version that works on the dev server by using a little QBJS trick to define _Width and _Height as varaibles and redefining the string variable as s$:
Pete's Mini Space Invaders For QBJS
To use the QBJS embed tag you'll want to use the share link that is generated from the QBJS IDE instead of the full source file. It will look something like this:
Code: (Select All)
[qbjs]https://qbjs.org?code=IF9UaXRsZSAiUGV0ZSdzIE1pbmkgU3BhY2UgSW52YWRlcnMgRm9yIFFCSlMiCkRpbSBfV2lkdGgsIF9IZWlnaHQ6xxEgPSA4....gSgyFfGCCvERwrkAKMg[/qbjs]
