Help returning a value.

From: Mathew Earle Reuther (graymere@zipcon.net)
Date: 07/09/02


Ok, say I've got a list of words or abbreviations which I want to be able
to plug into my score or who commands and such.  The value input into the
command display should vary based upon the level of the character.  So,
for example, let's say that the character's level is 25 and the value i
want to display in my score command is "Bobcat" . . . how would I go about
setting up a method of determining what value to return?

Bear in mind that there are ranges of levels for each thing I wish to
return, so "Bobcat" might come back for levels 21-30, but from 15-20 it is
"Scarecrow" and from 31-45 it is "Tokyo".

I originally thought I would want to use an bunch of if/else with my level
ranges, but then i wasn't sure how . . . hrm, wait a moment, if I return
numeric values from an if/else type deal, I can then use a const struct
filled with the names or abbreviations I want, right?  Or something like
that?

(Pardon the thinking out loud, but it helps me try to work through, and
who knows, it could be useful to someone else in the future.)

So I return an int value and use that int value to determine what location
in my const char i need to return.  Hrm, ok, well, I'm going to go poke
around some more, if anyone has any thoughts they'd like to share on this,
I'd very much appreciate it.

-Mathew

--
   +---------------------------------------------------------------+
   | 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