



Magician

GroupMembers
Posts128
JoinedApr 9, 2010
sure can
here is whats in the house file
frame 1 of GDB
here is whats in the house file
void load_homedata() { FILE *fpList; char *filename; char list[256]; char buf[MAX_STRING_LENGTH]; first_home = NULL; last_home = NULL; sprintf( list, "%s%s", HOUSE_DIR, HOUSE_LIST ); if ( ( fpList = fopen ( list, "r" ) ) == NULL ) { log_string ( "Cannot open house.lst for reading. Home loading aborted." return; } for ( ; ; ) { filename = feof( fpList ) ? "$" : fread_word( fpList ); if ( filename[0] == '$' ) break; if ( !load_house_file( filename ) ) { sprintf( buf, "Cannot load house file: %s", filename ); bug( buf, 0 ); } } fclose( fpList ); fpList = NULL; return; }
frame 1 of GDB
(gdb) frame 1 #1 0x00000000005afe74 in load_homedata () at house.c:1958 1958 if ( !load_house_file( filename ) ) (gdb) list 1953 filename = feof( fpList ) ? "$" : fread_word( fpList ); 1954 1955 if ( filename[0] == '$' ) 1956 break; 1957 1958 if ( !load_house_file( filename ) ) 1959 { 1960 sprintf( buf, "Cannot load house file: %s", filename ); 1961 bug( buf, 0 ); 1962 } (gdb) print supermob $1 = (CHAR_DATA *) 0x0



Geomancer

GroupAdministrators
Posts1,992
JoinedJul 26, 2005
well i mean the house file it is trying to load
hmm no supermob lol that would explain the crash...




Geomancer

GroupAdministrators
Posts1,992
JoinedJul 26, 2005
(gdb) list 389 log_string( "Loading books" ); 390 load_books( ); 391 392 log_string("Loading Housing System, Home Accessories Data," 393 " and Home Auctioning System"; 394 load_homedata(); 395 load_accessories(); 396 load_homebuy(); 397 398 fBootDb = TRUE;
ok now looking at this i can tell why it is crashing

/* * initialize supermob. * must be done before reset_area! * */ init_supermob( );
and that is in the boot_db function in db.c


Magician

GroupMembers
Posts128
JoinedApr 9, 2010
That makes a whole lot of sense
and it would have been what I had done that borked it up lol
thank you once again
Remcon you are a gentleman and a scholar
and it would have been what I had done that borked it up lol
thank you once again
Remcon you are a gentleman and a scholar



Geomancer

GroupAdministrators
Posts1,992
JoinedJul 26, 2005
you're welcome




Magician

GroupMembers
Posts128
JoinedApr 9, 2010
OK so I'm working on importing OasisOLC into my mud
I'm going through fixing errors and things like that, but there is just one error that pops up in multiple places that I can't seem to figure out
It has to do with this line
and I know the wear flags were changed to parts and looking in mud.h I see that the parts array is named part_flags
so I would assume (correct me if I'm wrong please) that the part_flags would take the place of the wear_flags
but when I try and compile is says
but even before I changed it it said the same thing about the wear_flags
some help would be greatly appreciated
I'm going through fixing errors and things like that, but there is just one error that pops up in multiple places that I can't seem to figure out
void oedit_disp_wear_menu( DESCRIPTOR_DATA *d ) { OBJ_DATA *obj = d->character->dest_buf; char buf[MAX_STRING_LENGTH]; int counter, col = 0; write_to_buffer( d, "50\x1B[;H\x1B[2J", 0 ); for ( counter = 0; counter <= ITEM_WEAR_MAX; counter++ ) { //if ( 1 << counter == ITEM_DUAL_WIELD ) // continue; sprintf( buf, "&g%2d&w) %-20.20s ", counter+1, capitalize(w_flags[counter]) ); if ( ++col % 2 == 0 ) strcat( buf, "\n\r" ); send_to_char_color( buf, d->character ); } sprintf( buf, "\n\rWear flags: &c%s&w\n\rEnter wear flag, 0 to quit: ", flag_string( obj->wear_flags, w_flags ) ); send_to_char_color( buf, d->character ); return; }
It has to do with this line
flag_string( obj->wear_flags, w_flags ) );
and I know the wear flags were changed to parts and looking in mud.h I see that the parts array is named part_flags
so I would assume (correct me if I'm wrong please) that the part_flags would take the place of the wear_flags
but when I try and compile is says
oedit.c:811: error: âOBJ_DATAâ has no member named âpart_flagsâ
but even before I changed it it said the same thing about the wear_flags
some help would be greatly appreciated



Geomancer

GroupAdministrators
Posts1,992
JoinedJul 26, 2005
would be
It uses parts which is an EXT_BV instead of an int so thats why it has to be ext_flag_string and it uses bp_flags instead of w_flags
ext_flag_string( &obj->parts, bp_flags ) );
It uses parts which is an EXT_BV instead of an int so thats why it has to be ext_flag_string and it uses bp_flags instead of w_flags



Magician

GroupMembers
Posts128
JoinedApr 9, 2010
Ah I had saw ext_flag_string in mud.h
and I remember the bp_flags now too
what is the & before obj?
and I remember the bp_flags now too
what is the & before obj?



Geomancer

GroupAdministrators
Posts1,992
JoinedJul 26, 2005
try it without it just so you know what kind of error message that causes




Magician

GroupMembers
Posts128
JoinedApr 9, 2010
Ah good idea just in case I see it again
now I'm having a problem in medit.c
with listing defense flags
it is saying defense_flags is undeclared
and I'm having problems finding any references to what should be there
please help again
now I'm having a problem in medit.c
with listing defense flags
write_to_buffer( d, "50\x1B[;H\x1B[2J", 0 ); for ( i = 0; i < MAX_DEFENSE_TYPE; i++ ) { sprintf( buf, "&g%2d&w) %-20.20s\n\r", i+1, defense_flags[i] ); send_to_char_color( buf, d->character ); }
it is saying defense_flags is undeclared
and I'm having problems finding any references to what should be there
please help again



Geomancer

GroupAdministrators
Posts1,992
JoinedJul 26, 2005
around the top of the file after the includes (that it is complaining in) add
it is in build.c around line 257
extern char *const defense_flags[];
it is in build.c around line 257



Magician

GroupMembers
Posts128
JoinedApr 9, 2010
Ah duh thanks very much
so I had the same thing with race_table and I added the same thing but for race_table
and I have this error
is this code
so I had the same thing with race_table and I added the same thing but for race_table
and I have this error
medit.c:702: error: request for member ârace_nameâ in something not a structure or union
is this code
void medit_disp_races( DESCRIPTOR_DATA *d ) { CHAR_DATA *victim = d->character->dest_buf; int iRace, columns = 0; write_to_buffer( d, "50\x1B[;H\x1B[2J", 0 ); if ( IS_NPC(victim) ) { for ( iRace = 0; iRace < MAX_NPC_RACE; iRace++ ) { ch_printf_color( d->character, "&g%2d&w) %-20.20s ", iRace, npc_race[iRace] ); if ( ++columns % 3 == 0 ) send_to_char( "\n\r", d->character ); } } else { for ( iRace = 0; iRace < MAX_RACE; iRace++ ) { ch_printf_color( d->character, "&g%2d&w) %-20.20s \n\r", iRace, race_table[iRace]->race_name ); /* if ( ++columns % 2 == 0 ) send_to_char( "\n\r", d->character ); */ } } send_to_char( "\n\rEnter race: ", d->character ); }



Geomancer

GroupAdministrators
Posts1,992
JoinedJul 26, 2005
I'll look some more tomorrow. So far it seems it might need modified for species and nations maybe lol.


Geomancer

GroupAdministrators
Posts1,992
JoinedJul 26, 2005
Ok so when setting race on players it is only used for skill_set which it gets from species->skill_set.
You already have a species in mset which will set the species and nation
although i suggest not using arg3 for setting the victim->species
change it to
And really after that is done it is probably good to toss them through set_race to set the ch->race to the species->skill_set and change the rest of them to match the new species lol.
You already have a species in mset which will set the species and nation
if( !str_cmp( arg2, "species" ) ) { victim->nation = find_nation( arg3 ); if( victim->nation ) { STRFREE( victim->species ); victim->species = STRALLOC( arg3 ); } return; }
although i suggest not using arg3 for setting the victim->species
change it to
if( !str_cmp( arg2, "species" ) ) { victim->nation = find_nation( arg3 ); if( victim->nation ) { STRFREE( victim->species ); victim->species = STRALLOC( victim->nation->name ); } return; }
And really after that is done it is probably good to toss them through set_race to set the ch->race to the species->skill_set and change the rest of them to match the new species lol.


Magician

GroupMembers
Posts128
JoinedApr 9, 2010
OK that just confused me lol
so I'm going to make sure I didn't goof up my question
The code I presented before was in the medit.c file for editing mobs
the code is supposed to list the mob races which even with mset is set as a race not as a nation or species
although I don't what a problem would be with modifying it so that mobs had nations and species
and oh boy I had a really huge brain fart.... lol the part it's complaining about is trying to use medit.c to change a players race, which of course would deal with nation or species
so I'm going to make sure I didn't goof up my question
The code I presented before was in the medit.c file for editing mobs
the code is supposed to list the mob races which even with mset is set as a race not as a nation or species
although I don't what a problem would be with modifying it so that mobs had nations and species
and oh boy I had a really huge brain fart.... lol the part it's complaining about is trying to use medit.c to change a players race, which of course would deal with nation or species



Geomancer

GroupAdministrators
Posts1,992
JoinedJul 26, 2005
Lol nod. Ok since it doesn't come with that olc added you kind of have to use the stuff that is in to figure out what you need to do. You would have to rewrite that code to show you the species (which still has nothing to do with showing the races). There isn't anything to show for players race since it is only for the skill_set. For example you can have 20 different species that all get the same skill_set (set of skills). I would actually suggest making it so you can't use that to set the race on a player.



Magician

GroupMembers
Posts128
JoinedApr 9, 2010
LOL I was editing my post while you were making yours
I must have been tired or something, but now I realize the part it's complaining about is the part with the PCs
if I want to continue to just use mset to set players race if I need to then I can just remove the if else statement
and as I reread your post lol you suggested I do just what I'm suggesting to do lol
I must have been tired or something, but now I realize the part it's complaining about is the part with the PCs
if I want to continue to just use mset to set players race if I need to then I can just remove the if else statement
and as I reread your post lol you suggested I do just what I'm suggesting to do lol



Magician

GroupMembers
Posts128
JoinedApr 9, 2010
Ok so I've gotten past those errors
now I have a part of the code
in mud.h
I have
and I'm getting the error
now I have a part of the code
if ( !can_omodify( ch, obj ) ) return;
in mud.h
I have
bool can_omodify args( ( CHAR_DATA * ch, OBJ_DATA * obj ) );
and I'm getting the error
oedit.c:108: undefined reference to `can_omodify'



Geomancer

GroupAdministrators
Posts1,992
JoinedJul 26, 2005
While there is one for that in mud.h there isn't an actual function anywhere in the code for that.


Magician

GroupMembers
Posts128
JoinedApr 9, 2010
yay
I tried just commenting those lines out, and I'm testing and "seemingly" everything is working fine.
But I have to say with Remcon's help it is coming along fabulously!
you have turned a bad day into a good one. thank you very much

I tried just commenting those lines out, and I'm testing and "seemingly" everything is working fine.
But I have to say with Remcon's help it is coming along fabulously!
you have turned a bad day into a good one. thank you very much