I'm making a program and i'm going crazy with that... i hope someone can help me...
I tried to do it as the code i attach, but it doesent works and i really dont get how to do it...
// set window properties
SetWindowTitle( "numbers" )
SetWindowSize( 1024, 768, 0 )
// set display properties
SetVirtualResolution( 1024, 768 )
SetOrientationAllowed( 1, 1, 1, 1 )
// x = Random(2,5)
x as integer
h as integer[5] = [0, 0, 0, 0, 0]
do
AddVirtualButton (1, 50, 300, 50)
do
if GetVirtualButtonPressed (1)
//Create the number
x = Random(1,5)
//search the number in the string h
index = h.find (x)
//If it finds the number it should retrieve -1 so:
if index <> -1
//Print the number and insert it to the string to not repaeat it again
h.insert (x)
print(x)
endif
//if it finds the number it is supposed to return to the beginning and create a new number...
elseif index = -1
//Print ("b")
//Print (x)
endif
sync()
loop
sync()
loop