Please check out A Merging of Fates !

Member Discussions

terms



[Previous] [Next] [Post] [Reply] [Topics] [Summary] [Search]


1. Structure Member Names Mon Aug 16, 2004 [1:55 AM]
Mitoushka
Email not supplied
member since: Aug 11, 2004
Reply
I hate snippets that don't work properly. Anyway!

Rom2.4b6 Codebase

In my save.c file I added in some lines referring to "incarnations" and when I make I am getting

Warning: Structure has no member named 'incarnations'

So now I am wondering..is this a definition error? Do I have to define incarnations somewhere, and if so, where do I define it and how do I define it? Sorry for being a noob, but I am learning as I go. Help would be appreciated.


2. RE: Structure Member Names Mon Aug 16, 2004 [2:23 AM]
Fire
Email not supplied
member since: Feb 29, 2000
In Reply To
Reply
How about this:

struct char_data {
char *name;
int deaths;
};

Can call like this:

void foo(struct char_data *ch) {

send_to(ch, "Your name is %s. You have died %d times!\n\r", ch->name, ch->deaths);

return;
}

Unerstan?
Never use a big word when a diminutive one will suffice.


3. RE: Structure Member Names Mon Aug 16, 2004 [2:33 AM]
Mitoushka
Email not supplied
member since: Aug 11, 2004
In Reply To
Reply
No, as a matter of fact I don't understand, but I figured out how to fix that problem on my own. Now my problem is that in interp.c I get undefined reference errors when it refers to do_remor and do_remort in the command table.


4. RE: Structure Member Names Mon Aug 16, 2004 [8:49 AM]
Razzer_9
Email not supplied
member since: Mar 5, 2001
In Reply To
Reply
In ROM, you need to need to let the compiler know of those two functions by sticking their declarations in interp.h .

Like this:

DECLARE_DO_FUN( do_remor );
DECLARE_DO_FUN( do_remort );




[Previous] [Next] [Post] [Reply] [Topics] [Summary] [Search]