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
➜ ROM
➜ Running the server
➜ Yet another Lope Color Prob HELP PLZ :(
Yet another Lope Color Prob HELP PLZ :(
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| NeMeSiS
(2 posts) Bio
|
Date
| Mon 06 May 2002 09:05 PM (UTC) |
Message
| 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. | Top |
|
Posted by
| Creeper386
USA (62 posts) Bio
|
Date
| Reply #1 on Tue 07 May 2002 02:14 PM (UTC) |
Message
| Well. I don't have an answer for you but do you know what the __cdecl is right after the void? It would seem to me it is talking about something that says void __cdecl but I've never seen anything like that.. or is it just something that it sticks in there?
Sorry just wondering about that.
Creep | Top |
|
Posted by
| NeMeSiS
(2 posts) Bio
|
Date
| Reply #2 on Tue 07 May 2002 09:52 PM (UTC) |
Message
| its nowhere in the source and no where on the error line so its something v C++ adds. the error line is just a { which is weird i tried removing it to still nothing but more errors. any1 wanna be so kind as to post a link to a windows rom w/ olc and color already added? :) i know smaug has it but i dont like smaug 2 much. or if sum1 can help me with that error thx. | Top |
|
Posted by
| Firedale2002
(6 posts) Bio
|
Date
| Reply #3 on Thu 27 Oct 2005 02:20 PM (UTC) |
Message
| paste the actual line that is at the line number that it's saying starts the error, that might give a better idea as to the cause. | 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.
15,267 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top