> There is no "move forward" or "back up" with con states. They are > not in any particular linear order as far as the code is concerned. > When exiting any state in the nanny you can proceed to any other you > want simply bu altering the end of its case block. Just put a > conditional at the end to check the value of the previous input. If > it was your "back up" choice then re-print the text for the previous > state and switch to it. If it was anything else print the text for > the next con state and switch to it. Look at the character name > verification portion of the nanny to see similar code in action. > > Now if you want to be clean about it you may need to move more of > the inline string constants to a header file so you don't have to > duplicate them within nanny. And if you really are careful to put > your states in numerical order you might consider incrementing and > decrementing. Of course this *will* mostly relegate you to a linear > step in either direction during the character creation sequence, but > it will also help organize your otherwise convoluted nanny. And, of course, free any memory that will be getting overwritten... so it will not be set aside more than once. Mythran -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | | Newbie List: http://groups.yahoo.com/group/circle-newbies/ | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 06/25/03 PDT