Bug for timo


Mrlegoboy 2019-06-29 03:06 (Edited)

It seems the debugger is trying to tell us that rom values directly caused an invalid parameter, which is not possible.

Bug For Timo.nx | Open in app
2019-06-29 03:10
Bug For Timo.nx | Open in app
2019-06-29 03:06

was8bit 2019-06-29 06:37

The error occurs because for

PLAY v,p[,len] [SOUND s]
The legal value for P is 1 to 96 and the code far exceeds this...

was8bit 2019-06-29 06:38

ALSO, There are times that the error code does not always match the actual error...

Timo 2019-06-29 09:25

was8bit is right. Error messages are often not very helpful yet. I have to improve them.

was8bit 2019-06-29 10:36 (Edited)

My best trick to avoid error code “errors” is to test any small changes or additions to code immediately..... if it ran OK before, then logically what you added caused the error... (or connects somehow to the error)

The more you add before you test, the more junk you have to research and sift thru...

It is SO much easier to just get in the habit of
1) add some code...
2) TEST by running it...
3) repeat...

was8bit 2019-06-29 10:39

Also... lots of bundled math can hide errors... I like to seperate my math out to avoid these tricky errors...

Mrlegoboy 2019-06-29 14:11

If you remove all the rom entries it just says “invalid parameter” with nothing else

was8bit 2019-06-29 16:36

1) you don’t need any ROM entries as NX goes to default ROM settings if there are none..

2) “invalid parameter” is actually the correct error code, as the highest musical note is allowed is 96 and the math you have put into the PLAY command exceeds 96 for the musical notes...

Timo 2019-06-29 17:10

For sound there are no default ROM entries, but as long as you don’t use the SOUND parameter in PLAY, it doesn’t use anything from the ROM at all.
Anyway, I’ll have to add some more info to the error messages.

was8bit 2019-06-29 17:40

There is some “sort of” defalt bring used as I can type

PLAY 0,90,100 SOUND 0

As the only line of code in the program, no rom...

And no matter what amount of time I put in it, I get a quick “chirp” sound.. no error code... so I guess I’m saying the code will kinda work without having ROM in the sense that the program does “something” and doesn’t produce an error code...

Log in to reply.