Well, Thats NOT entirely all true.....
I'm not a C Programmer, BUT I have the Basic Knowledge on how to
PICK up on programming techniques. I think if someone has experience in
programming in "Rexx, Assembly, C" They can do Virtually all coding
cause they BOTH follow principles.... I myself started as a Rexx
Programmer, I asked questions... And Now I dont call myself a NOVICE at
C. All Programming is, is how much time and EFFORT you put in a JOB, and
how well your problem solving skills are.... (I'm not trying to Jump
down your throat if thats what your thinking. Just stating a Mere fact.
L8r...
Jeremy Davis (Killer) jdavis@aardvarkol.com | jdavis@unix.aardvarkol.com
CEO - The UnForgiven Enterprises ( http://www.aardvarkol.com/tufent/ )
On Tue, 22 Oct 1996, Admin of The Keep wrote:
> On Tue, 22 Oct 1996, Nicholas S. Wourms wrote:
>
> > Hi, I have been trying for quite some time to get races to appear in
> > do_who. The format I currently have is:
> >
> > < 1 Cl > Playername the Title
> >
> > I would like to change this so that do_who returns this:
> >
> > < 1 Cl > Playername the Title (Race)
> >
> > I have tried using GET_RACE only to receive a "((null))" for race. When
> > I set my race to eliminate the ((null)), I get a nasty segmentation
> > fault. Any real coders out there have some suggestions for me?
>
> To explain why this problem is occuring: GET_RACE is inevitably a
> macro that returns what NUMBER represents the race. It's hard to
> print a number as a string without conversion. And since you don't
> want to print "2" most likely, here is the sollution:
>
> There's probably a table or array of sorts that has the names of all
> the races in it; you can use the race number as an index to retrieve
> the race's name. Eg., for classes it's pc_class_types[]. Once you
> find the array/table with the name in it, you index to it:
>
> race_names[GET_RACE(ch)]
>
> So, if race is 2, it will return the 3rd element of race_names, and if
> race_names is:
>
> const char *race_names[] = {
> "Human",
> "Elf",
> "Dwarf",
> "Orc",
> "\n"
> };
>
> Then race_names[GET_RACE(ch)] will be equivalent to "Dwarf". (BTW, I'm
> counting from zero as does C, so don't try to tell me I'm wrong here :))
>
> COMMENTS YOU'LL WANT TO SKIP IF YOU HAVE A TENDENCY TO MISUNDERSTAND, OR
> ARE OVER-PROTECTIVE OF NEWBIES, OR ARE OVERLY DEFENSIVE OF ONESELF. THE
> BELOW IS NOT INTENDED AS A FLAME:
>
> I truely don't think you should be coding without some basic knowledge
> of C, or even programming in general. This isn't to say you can't run
> a MUD, but it just doesn't make sense to me how many people think it's
> just a "tiny little manner of learning to code while running the MUD."
> Very often people underestimate the complexity of C, and more so, they
> underestimate the complexity and size of a MUD. A MUD is not a little
> learning project. "Hello world" is a learning project, so is a number
> guessing game. A MUD is just a _tad_ bit more complex than the number
> guessing game, I'd venture to say... :P~
>
> Also, not being able to see helps you get down the good spelling
> required to program, so I suggest you poke out your eyes now, then see
> how well you can code afterwards; no more embarrassing typos where you
> accidentally spelled the word correctly.
>
>
> <*=-+Daniel+-=*>
> "Forgive me father, for I am sin."
>
>
> +-----------------------------------------------------------+
> | Ensure that you have read the CircleMUD Mailing List FAQ: |
> | http://cspo.queensu.ca/~fletcher/Circle/list_faq.html |
> +-----------------------------------------------------------+
>
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://cspo.queensu.ca/~fletcher/Circle/list_faq.html |
+-----------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/18/00 PST