I'm wanting to install extended Bitvectors into my SWR1.0 mud so that i can add in some new things. Problem is I tried the smuag version of this and it just made everything go haywire. If any knows how to convert all of this successfully into SWR1.0 please contact me on here and explain how.
Thanx.
Jason
We can help you with any coding problems, but you need to be alot more specific than "haywire". What compilation errors did you get? if you can post them here we can try to help.
well i can't bespecific cause when i did it and it was went haywire that was like 2 weeks ago. Mainly i just want to see if some one can help me get the extended bitvectors to work on swr 1.0 I have taken out all that i did before.
Put it back in, let us know what errors you get and we can help you fix them. Without the error messages all we're doing is guesswork which might or might not be useful in solving your problem and will probly only lead you to serious frustration. Some errors may be OS or compiler specific so we really do need them to be of any real help to you.
If you want help, you'll have to put them in. Even if we told you how to do it, you'd have to go through all that trouble anyways, so you might as well do it and let us help you with the errors as they come. If you really don't want to, we might be able to help with general questions, but you would need to describe what you did, what code you put in, and how you were trying to implement it.
Ok. I got them all put in again.... Although i got a hell of a lot less errors this time.... I'm down to 0 errors and one warning.
Here is the Error:
reset.c: In function `reset_area':
reset.c:1518: warning: assignment from incompatible pointer type
Here is the code for it:
[code]
case BIT_RESET_ROOM:
if ( !(pRoomIndex = get_room_index(pReset->arg1)) )
{
bug( "Reset_area: 'B': room: bad room vnum %d.", pReset->arg1 );
continue;
}
plc = &pRoomIndex->room_flags;
break;
[/code]
The { plc = &pRoomIndex->room_flags; } is line 1518
Yeah, I had the same thing with mine. Unless you convert all of the things that use plc in that function to xbits, then you'll have a problem. What I ended up doing when I converted my SWR was to add EXT_BV *xplc;, and changes:
plc = &pRoomIndex->room_flags;
to
xplc = &pRoomIndex->room_flags;
and then add the extra check at the bottom where the normal plc is is used. Unless you just wanna take out room reset bits, which is what I ended up doing, cause I dunno anyone who uses them.
well i did it how i just said... and well it's like the room flags aren't being recognized and some rooms seem to be marked private even without the flag... And idea why?
The room flags aren't being recognized? Did you convert the bv to numbers, or did you put them in an enum? Also, if you can't set them, it might be because you didn't change the part in build.c that sets them, removing the <<. Here is what mine looks like:
if ( !str_cmp( arg, "flags" ) )
{
if ( !argument || argument[0] == '\0' )
{
send_to_char( "Toggle the room flags.\n\r", ch );
send_to_char( "Usage: redit flags <flag> [flag]...\n\r", ch );
send_to_char( "\n\rPossible Flags: \n\r", ch );
send_to_char(show_ext_flag_string(NUMITEMS(r_flags), r_flags), ch);
return;
}
while ( argument[0] != '\0' )
{
argument = one_argument( argument, arg2 );
value = get_rflag( arg2 );
if ( value < 0 || value > MAX_BITS )
ch_printf( ch, "Unknown flag: %s\n\r", arg2 );
else if ( value == ROOM_PLR_HOME && get_trust(ch) < LEVEL_SUPREME )
send_to_char( "If you want to build a player home use the 'empty_home' flag instead.\n\r", ch );
else
{
xTOGGLE_BIT( location->room_flags, value );
}
}
return;
}
I'll give you the function that I use to show the flags as well:
char *show_ext_flag_string( int len, char * const flagarray[] )
{
static char buf[MAX_STRING_LENGTH];
int x;
buf[0] = '\0';
for ( x = 0; x < len; x++ )
{
strcat( buf, flagarray[x] );
strcat( buf, " " );
}
if ( (x=strlen(buf)) > 0 )
buf[--x] = '\0';
return buf;
}