Hey Everyone,
First off, I'm new to this stuff for the most part, and may sound like a
complete moron, but I'm hoping someone here can help me out.
I'm trying to write some code, and I'm getting this error message:
act_misc.c:800: request for member `name' in something not a structure or
union
act_misc.c:805: request for member `name' in something not a structure or
union
act_misc.c:806: request for member `timer' in something not a structure or
union
act_misc.c:807: request for member `dir' in something not a structure or
union
Here's some of the code:
{
char * buf;
char buf2[MAX_STRING_LENGTH];
int track;
buf = NULL;
for ( track = 0; track < 7; track ++)
{
buf = ch->in_room->track[track].name; /* <---
Line 800 */
if (buf != NULL)
{
sprintf(buf2, "Track 1: %s\t\tTimer: %d\tDir %s\n\r",
ch->in_room->track[track].name, /*
<---- Line 805 */
ch->in_room->track[track].timer,
dir_name[ch->in_room-.track[track].dir]);
send_to_char(buf2, ch);
}
etc...
In Merc.h:
Under room_index_data, I have defined:
TRACK_DATA * track[7];
and in the typedef's:
typedef struct track_data TRACK_DATA;
and in the structs:
struct track_data
{
char * name;
int dir;
int timer;
};
And I just don't understand that error message. Any help would
be appreciated.
Thanks!
-Cameron