ok i patched the code and changed the /e but i still have another error:
c:\windows\desktop\rom\src\comm.c(2473) : error C2084: function 'void __cdecl page_to_char(const char *,struct char_data *)' already has a body
how do i fix this? im running the win version of rom and compiling with visual C++ ive also tried using cygwin to make it and still get that error.
i notice in the source of comm.c theres 2 of these:
/*
* Send a page to one char.
*/
void page_to_char( const char *txt, CHAR_DATA *ch )
{
if ( txt == NULL || ch->desc == NULL)
return;
if (ch->lines == 0 )
{
send_to_char(txt,ch);
return;
}
#if defined(macintosh)
send_to_char(txt,ch);
#else
ch->desc->showstr_head = alloc_mem(strlen(txt) + 1);
strcpy(ch->desc->showstr_head,txt);
ch->desc->showstr_point = ch->desc->showstr_head;
show_string(ch->desc,"");
#endif
}
/*
* Page to one char, new colour version, by Lope.
*/
void page_to_char( const char *txt, CHAR_DATA *ch )
{
const char *point;
char *point2;
char buf[ MAX_STRING_LENGTH * 4 ];
int skip = 0;
#if defined(macintosh)
send_to_char( txt, ch );
#else
buf[0] = '\0';
point2 = buf;
if( txt && ch->desc )
{
if( IS_SET( ch->act, PLR_COLOUR ) )
{
for( point = txt ; *point ; point++ )
{
if( *point == '{' )
{
point++;
skip = colour( *point, ch, point2 );
while( skip-- > 0 )
++point2;
continue;
}
*point2 = *point;
*++point2 = '\0';
}
*point2 = '\0';
ch->desc->showstr_head = alloc_mem( strlen( buf ) + 1 );
strcpy( ch->desc->showstr_head, buf );
ch->desc->showstr_point = ch->desc->showstr_head;
show_string( ch->desc, "" );
}
else
{
for( point = txt ; *point ; point++ )
{
if( *point == '{' )
{
point++;
continue;
}
*point2 = *point;
*++point2 = '\0';
}
*point2 = '\0';
ch->desc->showstr_head = alloc_mem( strlen( buf ) + 1 );
strcpy( ch->desc->showstr_head, buf );
ch->desc->showstr_point = ch->desc->showstr_head;
show_string( ch->desc, "" );
}
}
#endif
return;
}
I see theres 2 sets with:
void page_to_char( const char *txt, CHAR_DATA *ch )
but i tried removing the old one no helpa nd tried remioving the new 1 still nothing when i remove either i get 25 errors when trying to compile again hehe plz help this poor newbie.
c:\windows\desktop\rom\src\comm.c(2473) : error C2084: function 'void __cdecl page_to_char(const char *,struct char_data *)' already has a body
how do i fix this? im running the win version of rom and compiling with visual C++ ive also tried using cygwin to make it and still get that error.
i notice in the source of comm.c theres 2 of these:
/*
* Send a page to one char.
*/
void page_to_char( const char *txt, CHAR_DATA *ch )
{
if ( txt == NULL || ch->desc == NULL)
return;
if (ch->lines == 0 )
{
send_to_char(txt,ch);
return;
}
#if defined(macintosh)
send_to_char(txt,ch);
#else
ch->desc->showstr_head = alloc_mem(strlen(txt) + 1);
strcpy(ch->desc->showstr_head,txt);
ch->desc->showstr_point = ch->desc->showstr_head;
show_string(ch->desc,"");
#endif
}
/*
* Page to one char, new colour version, by Lope.
*/
void page_to_char( const char *txt, CHAR_DATA *ch )
{
const char *point;
char *point2;
char buf[ MAX_STRING_LENGTH * 4 ];
int skip = 0;
#if defined(macintosh)
send_to_char( txt, ch );
#else
buf[0] = '\0';
point2 = buf;
if( txt && ch->desc )
{
if( IS_SET( ch->act, PLR_COLOUR ) )
{
for( point = txt ; *point ; point++ )
{
if( *point == '{' )
{
point++;
skip = colour( *point, ch, point2 );
while( skip-- > 0 )
++point2;
continue;
}
*point2 = *point;
*++point2 = '\0';
}
*point2 = '\0';
ch->desc->showstr_head = alloc_mem( strlen( buf ) + 1 );
strcpy( ch->desc->showstr_head, buf );
ch->desc->showstr_point = ch->desc->showstr_head;
show_string( ch->desc, "" );
}
else
{
for( point = txt ; *point ; point++ )
{
if( *point == '{' )
{
point++;
continue;
}
*point2 = *point;
*++point2 = '\0';
}
*point2 = '\0';
ch->desc->showstr_head = alloc_mem( strlen( buf ) + 1 );
strcpy( ch->desc->showstr_head, buf );
ch->desc->showstr_point = ch->desc->showstr_head;
show_string( ch->desc, "" );
}
}
#endif
return;
}
I see theres 2 sets with:
void page_to_char( const char *txt, CHAR_DATA *ch )
but i tried removing the old one no helpa nd tried remioving the new 1 still nothing when i remove either i get 25 errors when trying to compile again hehe plz help this poor newbie.