Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ Compiling the server
➜ SMAUG Undefined Reference
SMAUG Undefined Reference
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Robert Powell
Australia (367 posts) Bio
|
Date
| Wed 11 Jun 2014 06:44 AM (UTC) |
Message
| In Mud.H
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. |
Just a guy having a bit of fun. Nothing more, nothing less, I do not need I WIN to feel validated. | Top |
|
Posted by
| Robert Powell
Australia (367 posts) Bio
|
Date
| Reply #1 on Wed 11 Jun 2014 07:17 AM (UTC) |
Message
| Dont worry, i found what I missed, left out a chunk of code from db.c that created the questmaster.
I think it is working now, I hope :) |
Just a guy having a bit of fun. Nothing more, nothing less, I do not need I WIN to feel validated. | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
11,999 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top