What isn't working? It compiles and runs OK for me when I comment out the first line and use the second.
(I had to edit a couple of things that stopped it compiling at all under both scenarios, my code below)
// 8ball magic
// test of DIM and RANDOM
global num as integer
global result as string
global pressed as integer
global totalAnswers as integer
totalAnswers = 13
//dim answers [ 13 ] as string = ["It is certain", "It is decidedly so", "Without a doubt", "Yes definitely", "You may rely on it", "As I see it, yes", "Most likely", "Outlook good", "Yes", "Signs point to yes", "Reply hazy try again", "Ask again later", "Better not tell you now"]
dim answers [ 20 ] as string = ["It is certain", "It is decidedly so", "Without a doubt", "Yes definitely", "You may rely on it", "As I see it, yes", "Most likely", "Outlook good", "Yes", "Signs point to yes", "Reply hazy try again", "Ask again later", "Better not tell you now", "Cannot predict now", "Concentrate and ask again", "Don't count on it", "My reply is no", "My sources say no", "Outlook not so good", "Very doubtful" ]
Sync()
// main loop
do
generateRandom()
checkKey ()
if pressed = 1
showResult()
endif
loop
function generateRandom ()
num = random(0,totalAnswers-1)
endfunction
function showResult ()
result = ( answers [ num ] )
while GetPointerReleased() = 0
print ( result )
Sync()
endwhile
pressed = 0
endfunction
function checkKey ()
if GetRawKeyState(37)
pressed = 1
endif
endfunction