Sprite collision not detected while on MSX-BASIC-KUN [xbasic]

Por Code Witcher

Resident (43)

Imagen del Code Witcher

22-09-2021, 21:31

This is the code I have:

10 SPRITE ON:ON SRPTE GOSUB 1000
...
1000 END

This is not working while running an xbasic compiled program. Why is this and what's the work around?

{mod: moved topic to Development forum}

Login sesión o register para postear comentarios

Por JohnHassink

Ambassador (5684)

Imagen del JohnHassink

23-09-2021, 00:39

If your code really says "ON SRPTE" instead of "ON SPRITE", it would indeed not work. Smile
In case that the command is spelled correctly in the code, a reason that I could think of for it not working, is that you make this statement before initiating the turbo block.
Maybe you could try to state this after the CALL TURBO.
Just guessing here.

Por Code Witcher

Resident (43)

Imagen del Code Witcher

23-09-2021, 02:05

Lol ok, I just typed it wrong here, but it's ok on my code, it does say ON SPRITE...
Ok I made the change you mentioned but I got now OTHER errors, about arrays being redimiensioned and so on... so I'll keep trying and post a solution here if I found it.

Por JohnHassink

Ambassador (5684)

Imagen del JohnHassink

23-09-2021, 06:14

Yeah if I remember correctly, you should define your variables, arrays and stuff after calling for "turbo", anyway.