Also having trouble defining it correctly.. (its been a long day)
Code:
struct craft_data {
int craft_id;
char * craft_name;
int craft_flags;
obj_vnum craft_object_vnum;
obj_vnum craft_crit_object_vnum;
int craft_timer;
char * craft_msg_self;
char * craft_msg_room;
char * craft_crit_msg_self;
char * craft_crit_msg_room;
-------------------------------
#define CRAFT_ID(craft) (craft->craft_id)
#define CRAFT_NAME(craft) (craft->craft_name ? craft->craft_name : "<No Name>")
#define CRAFT_FLAGS(craft) (craft->craft_flags)
#define CRAFT_OBJVNUM(craft) (craft->craft_object_vnum)
#define CRAFT_CRIT_OBJVNUM(craft) (craft->craft_crit_obj_vnum)
#define CRAFT_TIMER(craft) (craft->craft_timer)
#define CRAFT_SKILL(craft) (craft->craft_skill)
#define CRAFT_SKILL_LEVEL(craft) (craft->craft_skill_level)
--------------
send_to_char(ch, "Item: %-14s Print Id: %d\r\n", CRAFT_NAME(craft), CRAFT_ID(craft));
rnum = real_object(CRAFT_OBJVNUM(craft));
cnum = real_object(CRAFT_CRIT_OBJVNUM(craft));
send_to_char(ch, "These prints display in detail the how-to of creating %s.\r\n", rnum == NOTHING ? "Nothing" : obj_proto[rnum].short_description);
send_to_char(ch, "Judging by the difficulty, you estimate that will take about %d seconds.\r\n", CRAFT_TIMER(craft));
send_to_char(ch, "There is a rare chance to make %s.\r\n", cnum == NOTHING ? "Nothing" : obj_proto[cnum].short_description);
send_to_char(ch, "Gazing at the requirements list, you envision what you need:\r\n");
while ((req = (struct requirement_data *) simple_list(craft->requirements)) != NULL)
{
crafts.c:179: error: 'struct craft_data' has no member named 'craft_crit_obj_vnum'
crafts.c: In function 'save_crafts_to_disk':
crafts.c:213: error: 'struct craft_data' has no member named 'craft_crit_obj_vnum'
crafts.c: In function 'show_craft':
crafts.c:479: error: 'struct craft_data' has no member named 'craft_crit_obj_vnum'
crafts.c:496: error: 'cnum' undeclared (first use in this function)
crafts.c:496: error: (Each undeclared identifier is reported only once
crafts.c:496: error: for each function it appears in.)
crafts.c:496: error: 'struct craft_data' has no member named 'craft_crit_obj_vnum'
crafts.c: In function 'craftedit_disp_menu':
crafts.c:894: error: 'struct craft_data' has no member named 'craft_crit_obj_vnum'
crafts.c:900: warning: operation on 'vnum' may be undefined