Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, 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.
 Entire forum ➜ SMAUG ➜ Compiling the server ➜ problems with undefined reference

problems with undefined reference

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Yetro   (40 posts)  Bio
Date Thu 09 May 2002 02:04 AM (UTC)
Message
when compiling with cgywin i got the followingg problems:

- undefined reference to 'sent_to_char'

it says on line 10069 of act_wiz... but i have no program to go to x line within documents.

and i don't know what code may a have to change..

The section where the problems are located is on the followind commnand:

/*
* Wizinduct code by Rjael (mud@dredge.axcomp.com) of SaltWind MUD
* (Some minor fixes and safeguarding added by Thoric)
*/
void do_wizinduct ( CHAR_DATA *ch, char *argument)
{
char arg1[MAX_INPUT_LENGTH];
char arg2[MAX_INPUT_LENGTH];
char buf[MAX_STRING_LENGTH];
CHAR_DATA *victim;
CLAN_DATA *clan;

if ( IS_NPC(ch) || !IS_IMMORTAL(ch) )
{
send_to_char( "Huh?\n\r", ch );
return;
}

argument = one_argument( argument, arg1 );
argument = one_argument( argument, arg2 );

if ( arg1[0] == '\0' )
{
send_to_char( "Usage: wizinduct <clan|outcast> <player>\n\r", ch );
return;
}

if ( !strcmp( arg1, "outcast" ) )
{
if ( arg2[0] == '\0' )
{
send_to_char( "Outcast whom?\n\r", ch );
return;
}
else
{
if ( (victim=get_char_room(ch, arg2)) == NULL )
{
send_to_char( "That player is not present.\n\r", ch );
return;
}
if ( IS_NPC(victim) )
{
send_to_char( "They don't really care for clans anyway.\n\r", ch );
return;
}
if ( victim->level > ch->level )
{
send_to_char( "They may not like you doing that.\n\r", ch );
return;
}
if ( (clan=victim->pcdata->clan) == NULL )
{
sent_to_char( "They are not a member of any clan.\n\r", ch );
return;
}
if ( clan->clan_type == CLAN_GUILD )
{
int sn;

for ( sn = 0; sn < top_sn; sn++ )
if ( skill_table[sn]->guild == victim->pcdata->clan->class
&& skill_table[sn]->name != NULL )
{
victim->pcdata->learned[sn] = 0;
ch_printf( ch, "You forget the ways of %s.\n\r", skill_table[sn]->name );
}
}

if ( victim->speaking & LANG_CLAN )
victim->speaking = LANG_COMUN;
REMOVE_BIT( victim->speaks, LANG_CLAN );
--clan->members;
if ( !str_cmp(victim->name, clan->deity) )
{
STRFREE( clan->deity );
clan->deity = STRALLOC( "" );
}
if ( !str_cmp(victim->name, clan->leader) )
{
STRFREE( clan->leader );
clan->leader = STRALLOC( "" );
}
if ( !str_cmp(victim->name, clan->number1) )
{
STRFREE( clan->number1 );
clan->number1 = STRALLOC( "" );
}
if ( !str_cmp(victim->name, clan->number2) )
{
STRFREE( clan->number2 );
clan->number2 = STRALLOC( "" );
}
victim->pcdata->clan = NULL;
STRFREE(victim->pcdata->clan_name);
victim->pcdata->clan_name = STRALLOC( "" );
act( AT_MAGIC, "You remove $N from $t", ch, clan->name, victim, TO_CHAR );
act( AT_MAGIC, "$n totally removes $N from $t", ch, clan->name, victim, TO_ROOM );
act( AT_MAGIC, "$n totally removes you from $t", ch, clan->name, victim, TO_VICT );
sprintf(buf, "The Immortal %s has removed %s from their clan!", ch->name, victim->name);
echo_to_all(AT_MAGIC, buf, ECHOTAR_ALL);
save_char_obj( victim );
return;
}
}
else
{
clan = get_clan( arg1 );
if ( !clan )
{
send_to_char( "That clan does not exist.\n\r", ch );
return;
}

if ( arg2[0] == '\0' )
{
send_to_char( "Induct whom?\n\r", ch );
return;
}
else
{
if ( (victim=get_char_room(ch, arg2)) == NULL )
{
send_to_char( "That player is not present.\n\r", ch );
return;
}

if ( IS_NPC(victim) )
{
send_to_char( "They dont really care for clans anyway.\n\r", ch );
return;
}

if ( victim->pcdata->clan )
{
sent_to_char( "They are already a member of a clan/guild!\n\r", ch );
return;
}

if ( clan->clan_type == CLAN_GUILD )
{
if ( victim->class != clan->class)
send_to_char( "Note: This player is not of the same class as this guild.\n\rProceeding.\n\r", ch );
return;
}
else
{
if ( victim->level < 10 )
{
send_to_char( "This player has yet to eat their Wheaties.\n\r", ch );
return;
}

if ( victim->level > ch->level )
{
send_to_char( "They may not like you doing that.\n\r", ch );
return;
}
}

++clan->members;
if ( clan->clan_type != CLAN_ORDER && clan->clan_type != CLAN_GUILD )
SET_BIT(victim->speaks, LANG_CLAN);

if ( clan->clan_type != CLAN_NOKILL && clan->clan_type != CLAN_ORDER
&& clan->clan_type != CLAN_GUILD )
SET_BIT( victim->pcdata->flags, PCFLAG_DEADLY );

if ( clan->clan_type == CLAN_GUILD )
{
int sn;

for ( sn = 0; sn < top_sn; sn++ )
{
if ( skill_table[sn]->guild == clan->class
&& skill_table[sn]->name != NULL )
{
victim->pcdata->learned[sn] = GET_ADEPT(victim, sn);
ch_printf( victim, "%s instructs you in the ways of %s.\n\r",
ch->name, skill_table[sn]->name);
}
}
}

victim->pcdata->clan = clan;
STRFREE(victim->pcdata->clan_name);
victim->pcdata->clan_name = QUICKLINK( clan->name );
act( AT_MAGIC, "You induct $N into $t", ch, clan->name, victim, TO_CHAR );
act( AT_MAGIC, "$n inducts $N into $t", ch, clan->name, victim, TO_ROOM );
act( AT_MAGIC, "$n adds you into $t", ch, clan->name, victim, TO_VICT );
save_char_obj ( victim );
return;
}
}
}

it look agly... buy if you copy and paste it on notepad i will look fine..

please help
Top

Posted by Kris   USA  (198 posts)  Bio
Date Reply #1 on Thu 09 May 2002 04:31 AM (UTC)
Message
sent_to_char?? Hehe looks like you've got yourself a typo; it should be send_to_char :)

As for a program to go to line x of the source, I use a program called Ultraedit. It's shareware, but it should work for ya. And it's great if u register it. You can download it directly from my mud's server at:

http://www.aethiamud.org/downloads/UEDIT32I.EXE

If ya got any questions about the program itself, etc, you're always welcome to visit me at aethiamud.org port 7000 =)

Hope that helps :)
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,066 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.