LoP1.38 Questions/Issues/Anomolies
< Newer Topic
:: Older Topic >
#81 Jan 30, 2010 3:47 pm
GroupAdministrators
Posts1,946
JoinedJul 26, 2005
in bank.c find
If you look you will notice that the snprintf buf is down near the ch_printf I think I had moved stuff around at some point but forgot to move it also.
Make the above look like this
That should fix the one you had give that junk data
decrease_gold( ch, amount ); increase_balance( ch, bank, amount ); new_transaction( bank, buf ); add_bank( bank ); save_banks( ); save_char_obj( ch ); snprintf( buf, sizeof( buf ), "%s opened the account with %s gold.", ch->name, num_punct( amount ) ); ch_printf( ch, "Account %s has been created and has a balance of %s gold.\r\n", bank->account, show_bank_balance( bank ) );
If you look you will notice that the snprintf buf is down near the ch_printf I think I had moved stuff around at some point but forgot to move it also.
Make the above look like this
decrease_gold( ch, amount ); increase_balance( ch, bank, amount ); snprintf( buf, sizeof( buf ), "%s opened the account with %s gold.", ch->name, num_punct( amount ) ); new_transaction( bank, buf ); add_bank( bank ); save_banks( ); save_char_obj( ch ); ch_printf( ch, "Account %s has been created and has a balance of %s gold.\r\n", bank->account, show_bank_balance( bank ) );
That should fix the one you had give that junk data
#82 Jan 30, 2010 3:59 pm
Last edited Jan 30, 2010 4:00 pm by Sanus Compleo
GroupMembers
Posts153
JoinedMar 25, 2008
#BANK Createdby Aster~ Account Aster~ NBalance 10000 Trans Sat Jan 30 4:06:40PM 2010 0û—¿Pú—¿²ü—¿8ú—¿ô,@Pú—¿1~ End #END
And for IMC...
Imclog: imc_read_socket: Descriptor error on #5: No such file or directory
Imclog: Last thing in incomm > autosetup Server01 reject connected
Imclog: Shutting down network.
EDIT: Wow you are fast
#83 Jan 30, 2010 4:06 pm
GroupAdministrators
Posts1,946
JoinedJul 26, 2005
Thanks lol I just happened to take a look at the forums and noticed something new was said and replied then figured that it looked like only one transaction so figured it got junk data on creation so went to look and see if there was a problem lol.
I would say that maybe the server address needed etc... changed from the looks of that, what do you have in your imc.config file in the imc directory?
I would say that maybe the server address needed etc... changed from the looks of that, what do you have in your imc.config file in the imc directory?
#84 Jan 30, 2010 8:23 pm
GroupAdministrators
Posts1,946
JoinedJul 26, 2005
Ok that thing in save.c makes it give a message that probably isn't what were looking for hmm. Guess I could just go with it returning to echeck without giving a message if not -1.
It works fine like it is suppose to though so go figure lol. It removed it and made a new one just like it was suppose to. I'm open to suggestions on it if anyone has any suggestions.
Sat Jan 30 9:13:43PM 2010 :: Saving pfile backup Sat Jan 30 9:13:43PM 2010 :: remove_oldest_pfile_backup: backup/7pfiles.tgz has been deleted to keep the pfile backups down. tar -czf backup/7pfiles.tgz player/: No such file or directory Sat Jan 30 9:13:44PM 2010 :: Starting pfile cleanup Sat Jan 30 9:13:44PM 2010 :: Finished pfile cleanup. Sat Jan 30 9:13:44PM 2010 :: Checked 1 player file.
It works fine like it is suppose to though so go figure lol. It removed it and made a new one just like it was suppose to. I'm open to suggestions on it if anyone has any suggestions.
#85 Jan 31, 2010 10:06 pm
GroupMembers
Posts153
JoinedMar 25, 2008
Progs that require a percentage crash the mud when they attempt to be triggered IF They do not have a percentage defined. Should probably default to 100 when being set, rather than crashing the mud.
#86 Feb 1, 2010 5:20 am
GroupAdministrators
Posts1,946
JoinedJul 26, 2005
Any chance you can give an example of the problem so I'll have something to go on when I start digging into it?
#87 Feb 1, 2010 8:57 am
GroupAdministrators
Posts1,946
JoinedJul 26, 2005
Ok, that should fix it in the next release.
In build.c in do_mpedit
find
change that to
That should fix it and I think for about all them you need to specify something let me know if you notice some where you shouldn't have to specify something for argument.
in mud_prog.c change mprog_percent_check to this
That seems to stop the crashing and all.
In build.c in do_mpedit
find
if( !str_cmp( arg2, "add" ) ) { if( ( mptype = get_mpflag( arg3 ) ) == -1 ) { send_to_char( "Unknown program type.\r\n", ch ); return; } if( mprog ) for( ; mprog->next; mprog = mprog->next ); CREATE( mprg, MPROG_DATA, 1 ); if( mprog ) mprog->next = mprg; else victim->pIndexData->mudprogs = mprg; xSET_BIT( victim->pIndexData->progtypes, mptype ); mpedit( ch, mprg, mptype, argument ); mprg->next = NULL; return; }
change that to
if( !str_cmp( arg2, "add" ) ) { if( ( mptype = get_mpflag( arg3 ) ) == -1 ) { send_to_char( "Unknown program type.\r\n", ch ); return; } if( !argument || argument[0] == '\0' ) { send_to_char( "You can't add a program without specifying some other information.", ch ); return; } if( mprog ) for( ; mprog->next; mprog = mprog->next ); CREATE( mprg, MPROG_DATA, 1 ); if( mprog ) mprog->next = mprg; else victim->pIndexData->mudprogs = mprg; xSET_BIT( victim->pIndexData->progtypes, mptype ); mpedit( ch, mprg, mptype, argument ); mprg->next = NULL; return; }
That should fix it and I think for about all them you need to specify something let me know if you notice some where you shouldn't have to specify something for argument.
in mud_prog.c change mprog_percent_check to this
void mprog_percent_check( CHAR_DATA *mob, CHAR_DATA *actor, OBJ_DATA *obj, void *vo, int type ) { MPROG_DATA *mprg; for( mprg = mob->pIndexData->mudprogs; mprg; mprg = mprg->next ) { if( !mprg || !mprg->comlist || !mprg->arglist || !is_number( mprg->arglist ) ) continue; if( ( mprg->type == type ) && ( number_percent( ) <= atoi( mprg->arglist ) ) ) { mprog_driver( mprg->comlist, mob, actor, obj, vo, false ); if( type != GREET_PROG && type != ALL_GREET_PROG ) break; } } }
That seems to stop the crashing and all.
#88 Feb 5, 2010 10:55 pm
GroupMembers
Posts153
JoinedMar 25, 2008
Parsing should be able to check ranges, as well as being able to show things with variables, e.g. show your actual HP in a room .
#89 Feb 7, 2010 10:59 am
GroupMembers
Posts10
JoinedSep 13, 2009
Hello, I found something strange.
I created Object "a big chest from wreck" with flag 'notake'.
I set Description and when someone looks at it, it writes "Nothing special".
But when I force to take the object and 'look' at it, it's Description is written properly...
I don't know is it bug or something.
Do I have to set something(some Flag or what) or just add Extra Desc with name 'chest' ?
I created Object "a big chest from wreck" with flag 'notake'.
I set Description and when someone looks at it, it writes "Nothing special".
But when I force to take the object and 'look' at it, it's Description is written properly...
I don't know is it bug or something.
Do I have to set something(some Flag or what) or just add Extra Desc with name 'chest' ?
#90 Feb 7, 2010 9:10 pm
GroupAdministrators
Posts1,946
JoinedJul 26, 2005
Nice catch.
in act_info.c function do_look
find
change it to this
The only change is this
became this
Just gave all that other around it to make it easier to know what part you should find
in act_info.c function do_look
find
for( obj = ch->in_room->last_content; obj; obj = obj->prev_content ) { if( can_see_obj( ch, obj ) ) { if( ( pdesc = get_extra_descr( arg, obj->first_extradesc ) ) ) { if( ( cnt += obj->count ) < number ) continue; send_to_char( pdesc, ch ); if( EXA_prog_trigger ) oprog_examine_trigger( ch, obj ); return; } if( ( pdesc = get_extra_descr( arg, obj->pIndexData->first_extradesc ) ) ) { if( ( cnt += obj->count ) < number ) continue; send_to_char( pdesc, ch ); if( EXA_prog_trigger ) oprog_examine_trigger( ch, obj ); return; } if( nifty_is_name_prefix( arg, obj->name ) ) { if( ( cnt += obj->count ) < number ) continue; pdesc = get_extra_descr( obj->name, obj->pIndexData->first_extradesc ); if( !pdesc ) pdesc = get_extra_descr( obj->name, obj->first_extradesc ); if( !pdesc ) { if( obj->bsplatter > 0 ) act( AT_OBJECT, "You can see blood on $p.\r\n", ch, obj, NULL, TO_CHAR ); else if( obj->bstain > 0 ) act( AT_OBJECT, "You can see blood stains on $p.\r\n", ch, obj, NULL, TO_CHAR ); else send_to_char( "You see nothing special.\r\n", ch ); } else send_to_char( pdesc, ch ); if( EXA_prog_trigger ) oprog_examine_trigger( ch, obj ); return; } } }
change it to this
for( obj = ch->in_room->last_content; obj; obj = obj->prev_content ) { if( can_see_obj( ch, obj ) ) { if( ( pdesc = get_extra_descr( arg, obj->first_extradesc ) ) ) { if( ( cnt += obj->count ) < number ) continue; send_to_char( pdesc, ch ); if( EXA_prog_trigger ) oprog_examine_trigger( ch, obj ); return; } if( ( pdesc = get_extra_descr( arg, obj->pIndexData->first_extradesc ) ) ) { if( ( cnt += obj->count ) < number ) continue; send_to_char( pdesc, ch ); if( EXA_prog_trigger ) oprog_examine_trigger( ch, obj ); return; } if( nifty_is_name_prefix( arg, obj->name ) ) { if( ( cnt += obj->count ) < number ) continue; pdesc = obj->desc; if( !pdesc ) pdesc = get_extra_descr( obj->name, obj->pIndexData->first_extradesc ); if( !pdesc ) pdesc = get_extra_descr( obj->name, obj->first_extradesc ); if( !pdesc ) { if( obj->bsplatter > 0 ) act( AT_OBJECT, "You can see blood on $p.\r\n", ch, obj, NULL, TO_CHAR ); else if( obj->bstain > 0 ) act( AT_OBJECT, "You can see blood stains on $p.\r\n", ch, obj, NULL, TO_CHAR ); else send_to_char( "You see nothing special.\r\n", ch ); } else send_to_char( pdesc, ch ); if( EXA_prog_trigger ) oprog_examine_trigger( ch, obj ); return; } } }
The only change is this
if( ( cnt += obj->count ) < number ) continue; pdesc = get_extra_descr( obj->name, obj->pIndexData->first_extradesc );
became this
if( ( cnt += obj->count ) < number ) continue; pdesc = obj->desc; if( !pdesc ) pdesc = get_extra_descr( obj->name, obj->pIndexData->first_extradesc );
Just gave all that other around it to make it easier to know what part you should find
#91 Feb 10, 2010 12:51 pm
Last edited Feb 10, 2010 12:51 pm by Lucif
GroupMembers
Posts10
JoinedSep 13, 2009
Thank's alot Remcon :-D
BTW. Sorry I wasn't here for a while...
BTW. Sorry I wasn't here for a while...
#92 Feb 10, 2010 1:47 pm
GroupAdministrators
Posts1,946
JoinedJul 26, 2005
No need to be sorry we all take a break here and there and some breaks are longer then others
Np, on the fix and again thanks for finding it, I don't have a copy of the mud that stays up and running so I don't normally find bugs anymore. I'm more then happy to work on fixing up ones that are found though.
Lol, eventually I'll do another release
Np, on the fix and again thanks for finding it, I don't have a copy of the mud that stays up and running so I don't normally find bugs anymore. I'm more then happy to work on fixing up ones that are found though.
Lol, eventually I'll do another release
#93 Apr 22, 2010 4:54 pm
Last edited Apr 22, 2010 4:55 pm by Lucif
GroupMembers
Posts10
JoinedSep 13, 2009
I've got something strange when I used traps in OLC.
They are missing when I use instaroom or instazone.
I just add trap in room:
reset trap room 7 3 enter
When I wrote 'reset list' mud prints:
"Room:[30001]
1)Trap: 9 7 3 30001 (none enter) (...)
2)Open [0] the south [2] door... "
But after using 'instazone', 'reset list' prints:
"Room:[30001]
1)Open [0] the south [2] door... "
Of course after 'savearea' there is no trap reset in file(proto area)...
Any clues?
BTW: In LOP 1.39 that's the same.
They are missing when I use instaroom or instazone.
I just add trap in room:
reset trap room 7 3 enter
When I wrote 'reset list' mud prints:
"Room:[30001]
1)Trap: 9 7 3 30001 (none enter) (...)
2)Open [0] the south [2] door... "
But after using 'instazone', 'reset list' prints:
"Room:[30001]
1)Open [0] the south [2] door... "
Of course after 'savearea' there is no trap reset in file(proto area)...
Any clues?
BTW: In LOP 1.39 that's the same.
#94 Apr 23, 2010 5:12 am
GroupAdministrators
Posts1,946
JoinedJul 26, 2005
Well without testing it and just going by what you said, I would have to say that the instaroom/instazone is clearing it off because the trap isn't actually in the room yet. After you do "reset trap room 7 3 enter" type "reset area" so that it resets the area and puts the trap in there so that instaroom/instazone should add it to the list when used. If that doesn't work let me know
#95 Apr 24, 2010 7:24 am
GroupMembers
Posts10
JoinedSep 13, 2009
Nothing changed.
But before instaroom/instazone when I type savearea there is 'NR T 9 7 3 30001 100' in file.
After there isn't. Hmm I don't know what I'm doing wrong...
But before instaroom/instazone when I type savearea there is 'NR T 9 7 3 30001 100' in file.
After there isn't. Hmm I don't know what I'm doing wrong...
#96 Apr 24, 2010 4:55 pm
GroupAdministrators
Posts1,946
JoinedJul 26, 2005
Well looks like there might be a few various problems here that might need delt with. First take and make you an object using vnum 31 in limbo.are and be sure to fold the area after making it lol. This is the object it uses for those traps. I'll dig into it more later on to look for other issues but it seems like there might be a few more issues here and there. After adding the reset and saving the area do a copyover for it to put the trap in the room (This is one that I'll check later since simply typing reset area should reset it).
#97 Apr 24, 2010 8:26 pm
GroupMembers
Posts600
JoinedDec 3, 2008
Side note: did you get my PM Remcon, I know you said you rarely notice them.
#98 Apr 28, 2010 12:53 pm
Last edited Apr 28, 2010 2:01 pm by dbna2
GroupMembers
Posts600
JoinedDec 3, 2008
I am using the mwreset system, and I am trying to get the items to only load one at a time. I want to make sure I did this right.
At the top of handle_mwreset i did
then under all the checks to make sure it should work I did
Then right before the loading of the items I did
At the top of handle_mwreset i did
int drop = 0;
then under all the checks to make sure it should work I did
if (drop > 1 ) continue;
Then right before the loading of the items I did
drop = 1;
#99 Apr 29, 2010 5:10 am
GroupAdministrators
Posts1,946
JoinedJul 26, 2005
Your setting drop to 1 but the check only continues if drop is higher then 1. might want to go with >= 1 for the check to continue
#100 Apr 29, 2010 10:00 am
GroupMembers
Posts600
JoinedDec 3, 2008
So other than that it should work?