[Code] Changing parse_class to integers ...

From: Neuromancer (amarquez@TRINITY.EDU)
Date: 09/27/97


This problem has been driving me nuts for a few hours now and
i think i definately need help.
I want to get parse_class to accept integers instead of characters
(so the menu is 1 - thief, 2 -cleric, etc) but I can't seem to figure
out how. I tried:


int parse_class(char arg)
{
        int temp;
        temp = atoi(arg);
        switch (temp) {
                     ...
in order to change the character input into a number, but I keep getting
compiler errors ...
I also tried :

int parse_class(char arg)
{ ....
}

but then act.wizard.c and interpreter.c go nuts on me (nanny apparently
only likes characters and do_set seems to have some pointer stuff
going on that I can't follow) ... Help! :)

the reason I need it is b/c I have over 26 classes i am trying to do and
I'm going to need #s instead of letters.
                                                        Thanks
                                                                -Angel


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST