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

By Code Witcher

Resident (43)

Code Witcher's picture

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 or register to post comments

By JohnHassink

Ambassador (5672)

JohnHassink's picture

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.

By Code Witcher

Resident (43)

Code Witcher's picture

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.

By JohnHassink

Ambassador (5672)

JohnHassink's picture

23-09-2021, 06:14

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