From: Chris Bailey Date: 2008-08-28T10:04:13+09:00 Subject: Re: Having a difficult time with Case statements. Michael W. Ryder wrote: > Chris Bailey wrote: >> Thank you. >> >> Attachments: >> http://www.ruby-forum.com/attachment/2623/startup.rb >> > > Looking at your code it looks like you need to remove the first case > statement and use something like a while loop. From what I can see it > looks like when you select '2' it changes 'startstate' to 1 and then > exits the case statement. An alternative is to set startstate in the > main program and then call startUp with the current startstate -- i.e. x > = startUp(startstate). Then test x to see if you want to call startUp > again or exit the program. Wrapped a call to startUp() into the main game loop and made startstate global....it's working like a charm now! =) Thanks a billion! -- Posted via http://www.ruby-forum.com/.