Quote: "try to make functions instead of doing gosub and goto"
Not using Goto I agree with wholeheartedly. Please, please, please, pretend it does not even exist. It's a throwback to the old days when programming languages didn't have procedures or functions and has been left in only as a legacy command. Don't use it. Period.
Besides, there's probably nothing you will ever want to do that you can't do without subroutines and functions.
But, I have to disagree with using functions
rather than using Gosub.
Yes, of course you could write a program which uses absolutely no subroutines - only functions. The question is why on earth would you want to do it?
Functions have their uses, but they should be used when using them has a clear advantage over using subroutines. Speed isn't one of them.
Variable scope in functions (local variables) can be both an advantage and a disadvantage. You have to declare lists of global variables - or pass parameters to functions and then you can only get one variable back. If your global variable declaration list is extensive, then why wouldn't you use a procedure?
A subroutine can automatically see all the variables in your program and any changes it makes to them can be seen by the program when it returns.
Where functions are really useful is where you only want a single value returned, as you can then include it in a condition. For example, you might have a function called InTheBox() which determines if a mouse click is within a region of the screen, returning True if it is and False if it isn't.
A function allows you to use:
If InTheBox() = True
Print "Got Me!"
Else
Print "Missed"
Endif
You couldn't do that quite as concisely with a subroutine.
So, in a nutshell, I am simply saying that it's no bad thing to mainly use procedures and use functions only when they make your life easier.
As for your menu problem, check out the tutorial on menus (number 16) here:
http://forum.thegamecreators.com/?m=forum_view&t=99497&b=10
TDK