Does GL Basic return an integer or a float value with the random command?Also is there any way of making sure that it does not picked the same random number if you ask to generate one several times in one loop.
it returns a Integer, and every loop are a different number
Here is a simple random number generator that doesn't pick the same number:
WHILE TRUE
GetRandom:
a = RND(5)
IF a = b THEN GOTO GetRandom
KEYWAIT
PRINT a,0,0
b = a
SHOWSCREEN
WEND
or:
FUNCTION RND_no_dup: nEnd
STATIC last
LOCAL r
@redo:
r = RND(nEnd)
IF r=last THEN GOTO redo
last=r
RETURN r
ENDFUNCTION