In Mud.H
In Quest.c
Everything compiles ok, but when it links, it bugs out with the following:
/home/BLAA_BLAA/src/quest.c:1033: undefined reference to `questmaster'
/home/BLAA_BLAA/src/quest.c:1033: undefined reference to `questmaster'
/home/BLAA_BLAA/quest.c:1037: undefined reference to `questmaster'
So what did i miss, and how do i fix it. Porting old code over to run with modern compilers is a nightmare :)
Rob.
extern QUEST_DATA * questmaster;
typedef struct quest_data QUEST_DATA;
struct quest_data
{
int level_range;
int practice_amt;
int practice_cost;
int award_vnum[MAX_QDATA+1];
int award_value[MAX_QDATA+1];
int gold_amt;
int gold_cost;
};
In Quest.c
void quest_list ( CHAR_DATA * ch )
{
set_char_color ( AT_WHITE, ch );
short i, count = 0;
send_to_char ( "&D--------------------------------------------------------------------------------\r\n", ch );
send_to_char ( "&cItem # Item Price \r\n", ch );
send_to_char ( "&D--------------------------------------------------------------------------------\r\n", ch );
for ( i = 0; i <= MAX_QDATA; i++ )
{
if ( questmaster->award_vnum && questmaster->award_value )
{
++count;
ch_printf ( ch, "&c[%2d] &w %-35s &c %-6s \r\n",
count, get_obj_index ( questmaster->award_vnum )->short_descr, num_punct ( questmaster->award_value ) );
}
}
ch_printf ( ch, "&c[%2d] &w %s Gold &c 120\r\n", count + 1, num_punct ( questmaster->gold_amt ) );
ch_printf ( ch, "&c[%2d] &w %d Practices &c %-6s\r\n", count + 2, questmaster->practice_amt, num_punct ( questmaster->practice_cost ) );
send_to_char ( "&D--------------------------------------------------------------------------------\r\n", ch );
send_to_char ( "&D Quest Buy # \r\n", ch );
return;
}
Everything compiles ok, but when it links, it bugs out with the following:
/home/BLAA_BLAA/src/quest.c:1033: undefined reference to `questmaster'
/home/BLAA_BLAA/src/quest.c:1033: undefined reference to `questmaster'
/home/BLAA_BLAA/quest.c:1037: undefined reference to `questmaster'
So what did i miss, and how do i fix it. Porting old code over to run with modern compilers is a nightmare :)
Rob.