Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, Yahoo!

Members: 0
Guests: 11
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » AFKMud Support & Development » Aset fix doesn't compile
Forum Rules | Mark all | Recent Posts

Aset fix doesn't compile
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Dec 29, 2005, 9:56 am   Last edited Nov 25, 2007, 5:32 pm by Samson
Go to the top of the page
Go to the bottom of the page

cynshard

GroupMembers
Posts95
JoinedNov 19, 2003

The post I'm refering to is here.

This portion of the fix:
if( !str_cmp( arg2, "low_vnum" ) )
   {
      if( check_for_area_conflicts( tarea, tarea->low_vnum, vnum ) )
      {
         ch_printf( ch, "Setting %d for low_vnum would conflict with another area.\r\n" );
         return;
      }
      if( tarea->hi_vnum < vnum )
      {
         ch_printf( ch, "Vnum %d exceeds the hi_vnum of %d for this area.\r\n", vnum, tarea->hi_vnum );
         return;
      }
      tarea->low_vnum = vnum;
      send_to_char( "Done.\r\n", ch );
      return;
   }

   if( !str_cmp( arg2, "hi_vnum" ) )
   {
      if( check_for_area_conflicts( tarea, tarea->hi_vnum, vnum ) )
      {
         ch_printf( ch, "Setting %d for hi_vnum would conflict with another area.\r\n" );
         return;
      }
      if( tarea->low_vnum > vnum )
      {
         ch_printf( ch, "Cannot set %d for hi_vnum smaller than the low_vnum of %d.\r\n", vnum, tarea->low_vnum );
         return;
      }
      tarea->hi_vnum = vnum;
      send_to_char( "Done.\r\n", ch );
      return;
   }


Should be
if( !str_cmp( arg2, "low_vnum" ) )
   {
      if( check_for_area_conflicts( tarea, tarea->low_vnum, vnum ) )
      {
         ch_printf( ch, "Setting %d for low_vnum would conflict with another area.\r\n", vnum );
         return;
      }
      if( tarea->hi_vnum < vnum )
      {
         ch_printf( ch, "Vnum %d exceeds the hi_vnum of %d for this area.\r\n", vnum, tarea->hi_vnum );
         return;
      }
      tarea->low_vnum = vnum;
      send_to_char( "Done.\r\n", ch );
      return;
   }

   if( !str_cmp( arg2, "hi_vnum" ) )
   {
      if( check_for_area_conflicts( tarea, tarea->hi_vnum, vnum ) )
      {
         ch_printf( ch, "Setting %d for hi_vnum would conflict with another area.\r\n", vnum );
         return;
      }
      if( tarea->low_vnum > vnum )
      {
         ch_printf( ch, "Cannot set %d for hi_vnum smaller than the low_vnum of %d.\r\n", vnum, tarea->low_vnum );
         return;
      }
      tarea->hi_vnum = vnum;
      send_to_char( "Done.\r\n", ch );
      return;
   }


The problem is that there are two ch_printf calls that contain %d tokens with no variable.
       
Post is unread #2 Dec 29, 2005, 12:54 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,868
JoinedJul 26, 2005

Heh, can't blame me for that one, in mine I used send_to_char instead of ch_printf. All the ones for SMAUGFUSS also used send_to_char heh so looks like it was something he did differently and just had left them out :)
       
Post is unread #3 Dec 29, 2005, 12:59 pm
Go to the top of the page
Go to the bottom of the page

cynshard

GroupMembers
Posts95
JoinedNov 19, 2003

Yeah, at first I thought it was just a typo, then I noticed the %d tokens. We all know how things can get sometimes :)
       
Post is unread #4 Dec 29, 2005, 2:30 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,868
JoinedJul 26, 2005

lol yep, I fiqured though since Samson gives me so much chaos when I leave something out I would do the same lol :)
       
Post is unread #5 Dec 29, 2005, 6:00 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

That's what we like to call a cut/paste oops. The fix has been.... er... fixed :P
       
Pages:<< prev 1 next >>