I'm doing some tests with the nextbasic's sprite functions. It works really well but I've found a problem with the %sprite continue function when using a variable with the sprite number instead the literal number.
If I try this code:
- 1 rem
5 RUN AT 3: BORDER 1: PAPER 0: INK 7: CLS
10 LOAD "nextnoon.spr" BANK 12: SPRITE BANK 12: SPRITE CLEAR : SPRITE PRINT 1: SPRITE BORDER 0
1000 SPRITE STOP :done=0
1010 SPRITE 50,32,128,0,1: SPRITE CONTINUE 50,32 TO 256 STEP 1 RUN ,,1, BIN 00000010
2000 REPEAT : WHILE done=0
2026 SPRITE MOVE INT
2036 v=% SPRITE CONTINUE 50: PRINT AT 5,5;v : rem shows 5 when moving, it is correct
2046 n=50: z=%SPRITE CONTINUE n: PRINT AT 6,5;z : rem shows 0 when moving, it is wrong
3500 REPEAT UNTIL 0
The second print (that uses the variable n with the value 50) shows 0 while moving... but it reffers to the same sprite that above print.
Am I doing something wrong? It would be cool that the "%SPRITE CONTINUE n" could variable values for use in loops, for example.
Thanks in advance,