Quote: "myrandom as integer [6] = [ 1, 3, 5, 7, 9, 11 ] <------------ SHOULD BE 6 NOT 5
MyTyp=myrandom[random(0,myrandom.length)]"
no no @blink0k
myrandom as integer[6] // this is an array with seven integers
myrandom as integer[5] // this is an array with six integers
myrandom as integer[5] = [ 1, 3, 5, 7, 9, 11 ] // this is correct
MyTyp = myrandom[random(0, myrandom.length)] // this selects a random element from indexes 0 to 6 inclusive
// Project: test
// Created: 21-06-10
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "test" )
SetWindowSize( 1024, 768, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 8, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 )
myrandom as integer[5] = [ 1, 3, 5, 7, 9, 11 ] // this is correct, changing the integer[5] to integer[6] will put a 0 at the end, and show up in your random numbers
do
MyTyp = myrandom[random(0, myrandom.length)] // this selects a random element from indexes 0 to 6 inclusive
Print( str(MyTyp) )
Sync()
loop