Well you have several probs
I’m not sure but I think you want to loop for 11 days?
First you can’t have an ‘IF’ statement nested outside of your loop
If you have an else statement you must have an endif statement
You cannot stack commands on top of an else
if this
do that
else
do this
do that
endif
Your program has no way to go back to your ‘D’ loop
Is ‘IN’ a variable?
If you want it to be an input you must make it an input
If you want it to be an inkey$() (a key pressed) then you have to make it that, but then it won’t be a number it will be in string form
The things you want to happen must be before your main loop or inside of your main loop or you have to give your program a way to get to it, as it is now your program will count through your ‘D� D1,D2,D3,D4 ect and then since the last ‘D’ is D11 it will go to the end
you need a way for your program to get back to your ‘D’ loop
your function must have endfunction
short of rewriting it that’s all I can do, just keep with it
some advice for what its worth
try and keep things in order
place data, arrays at the top or at the bottom
placing them in the middle gets confusing
use a ‘gosub’ if you want to return
a ‘goto’ if not
hope it helps
My advice is free -
unfortunately you get what you pay for (-: