change:
(rnd(2)+7)
to
(rnd(8)+1)
Reason:
rnd(8) will return a number between 0-8
adding 1 makes the range from 1-9 (which is your valid ranges)
rnd(2) will return a number from 0-2
adding 7 makes the range from 7-9
(which would limit you to three possible outcomes)
7,8,or 9
======
I edited your app slightly to test it
-changed the spelling of spaghetti
do
randomize timer()
dim dinner$(10)
dinner$(1)="chicken"
dinner$(2)="pizza"
dinner$(3)="steak"
dinner$(4)="Spaghetti"
dinner$(5)="sloppy joes"
dinner$(5)="chicken(anyway you like it)"
dinner$(6)="Subs"
dinner$(7)="stew"
dinner$(8)="hot dogs"
dinner$(9)="brats"
num=rnd(8)+1
print num; " ";dinner$(num)
`input "find another meal?",another$
`if another$="yes"
`goto start
`else
`end
`endif
sync
wait key
loop
seems to work fine.
edit:
Actually you only need to randomize the timer when the app is first launched. So you could have it like this
randomize timer()
do
dim dinner$(10)
dinner$(1)="chicken"
dinner$(2)="pizza"
dinner$(3)="steak"
dinner$(4)="spaghetti"
dinner$(5)="sloppy joes"
dinner$(5)="chicken(anyway you like it)"
dinner$(6)="Subs"
dinner$(7)="stew"
dinner$(8)="hot dogs"
dinner$(9)="brats"
num=rnd(8)+1
print num; " ";dinner$(num)
`input "find another meal?",another$
`if another$="yes"
`goto start
`else
`end
`endif
sync
wait key
loop
~zen