My game works fine until I press tab (scancode 15) to call this code into action...
if scancode()=15
sprite 3000,0,0,3001
tmp2=0
do
for tmp=0 to 9
if tmp=tmp2 then ink RGB(0,255,0),rgb(0,0,0) else ink RGB(0,0,0),rgb(0,0,0)
Text 10,10+(textsize*tmp),menu$(tmp) : `this is line 365
next tmp
if downkey()=1 then inc tmp2
if upkey()=1 then dec tmp2
if tmp2<0 then tmp2=9
if tmp2>9 then tmp2=0
loop
endif
I get
Quote: "Runtime error 118 - array does not exist or array subscript out of bounds at line 365"
this is the array code
dim menu$(9)
menu$(0)="Items"
menu$(1)="Weapons"
menu$(2)="Armour"
menu$(3)="Key Items"
menu$(4)="Players"
menu$(5)="Settings"
menu$(6)="Status"
menu$(7)="Console"
menu$(8)="Chat mode"
menu$(9)="Exit"
any ideas why I'm getting this message?