Posts: 1,956
Threads: 65
Joined: Jun 2003
Quote:axipher Wrote:but anyway it does the same thing, doesnt it
No I don't believe so. With yours it checks choice$ over and over again for each one. with SELECT CASE it's only once.....
You're absolutley right, Whitey.
Axipher,
You said " ...the main menu works fine up until i access a option wioth another INPUT command".
Maybe you did an INPUT OPTION$ in one of the sub-menus. Then when you returned to the main menu OPTION$ was now different. Now, using the SELECT CASE, you don't care whether OPTION$ is re-used by a sub-menu. You used it already, and don't need it anymore when returning from the sub-menu.
*****
Posts: 488
Threads: 19
Joined: Sep 2005
well thnx for the input, ill hav my cpu bak soon to continue work, my file is on a floppy, and my new cpu dont have a floppy drive, wats up wit that...
o and for ea menu, the option variable is different, like choice$, townchoice$, warchoice$, etc
Posts: 324
Threads: 12
Joined: Nov 2005
Also, to avoid reprinting the options menu and the selected option, we may do something like this:
Code:
do
'' display options menu
cls
print "What would you like to do next?"
print
print "a. Stats"
print "b. Inventory"
print "c. Town"
print "d. Battle"
print "e. Quit"
do
'' check for input
dim choice as string
choice$ = lcase$( inkey$ )
'' and act accordingly
if( choice$ <> "" ) then
select case choice$
case "a": gosub Stats : exit do
case "b": gosub Inventory : exit do
case "c": gosub Town : exit do
case "d": gosub Battle : exit do
case "e": gosub Quit : system
end select
end if
loop
loop
stylin:
Posts: 488
Threads: 19
Joined: Sep 2005
much appreciatated, now how do u close a topic???
Posts: 6,419
Threads: 74
Joined: Mar 2002
Posts: 3,522
Threads: 189
Joined: Dec 2003
How do I shoot web?
Go web, go!
Up, Up and away!
axipher, you can request the topic closed from an admin, but there's really no reason to do so..
Just leave the topic and never look back
Posts: 488
Threads: 19
Joined: Sep 2005
lol, i guess so, but its so active