Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
Bug in do_drag( )
Oct 8, 2017, 12:40 am
By GatewaySysop
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Beastmaster 6D sound files
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Google, Yandex, DotBot

Members: 0
Guests: 10
Stats
Files
Topics
Posts
Members
Newest Member
476
3,704
19,231
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » BUG in log file
Forum Rules | Mark all | Recent Posts

BUG in log file
< Newer Topic :: Older Topic > fread_fuss unknown word BUG in log

Pages:<< prev 1 next >>
Post is unread #1 Feb 26, 2014, 1:49 pm
Go to the top of the page
Go to the bottom of the page

Kryetic
Fledgling
GroupMembers
Posts1
JoinedFeb 25, 2014

Getting the error below in the log file for every .are file. Any idea what the cause may be?

Tue Feb 25 22:20:15 2014 :: [*****] BUG: fread_fuss_mobile: unknown word: Vnum
Tue Feb 25 22:20:15 2014 :: [*****] FILE: limbo.are LINE: 16
Tue Feb 25 22:20:15 2014 :: [*****] BUG: fread_fuss_mobprog: unknown word: Progtype
Tue Feb 25 22:20:15 2014 :: [*****] FILE: limbo.are LINE: 41
Tue Feb 25 22:20:15 2014 :: [*****] BUG: fread_fuss_mobprog: unknown word: Arglist
Tue Feb 25 22:20:15 2014 :: [*****] FILE: limbo.are LINE: 42

Thanks
       
Post is unread #2 Feb 26, 2014, 5:01 pm   Last edited Feb 26, 2014, 5:03 pm by Patriot
Go to the top of the page
Go to the bottom of the page

Guest - (Unregistered)

My guess is that you changed a variable or added a variable to your mob_data

If you didn't then yah I wouldn't know what else to tell yah. Because you can accidently erase a line in one area if you edited the file directly, but if it is in every area file, then yah it is a code issue.

But if you did, you can't just add a varible to anything that is written to the area files, without changing the area_version
putting in checks for the area_version, folda all the areas to the new version.

It can get messy, you need a backup of all your area files before you do that.
       
Post is unread #3 Feb 27, 2014, 6:55 pm
Go to the top of the page
Go to the bottom of the page

ayuri
Magician
GroupMembers
Posts239
JoinedJun 13, 2008

There are a whole bunch of log warnings like that in the fresh copy of smaugfuss1.9 i pulled just a moment ago.

I think its the:
bool fMatch;   // Unused, but needed to shut the compiler up about the KEY macro

that can be found in db.c functions fread_fuss_mobile and others that is causing it.

Looks like an oversight from how the old area format worked.
All and all, while untidy, I'd not worry too much about it.

ayuri
       
Post is unread #4 Feb 28, 2014, 3:25 am
Go to the top of the page
Go to the bottom of the page

Quixadhal
Conjurer
GroupMembers
Posts398
JoinedMar 8, 2005

Those are not compile-time warnings, they're warnings from the area loading code telling you your area file is corrupt. How it's corrupt is unknown, but the fact that it's expecting a certain kind of symbol and finding something else which it doesn't recognize probably means a section terminator got lost somewhere, so the code is trying to read in mobile data and finding keywords that are either wrong, or don't make sense in that context.

So, you really can't just "not worry about it", as it means at least some of your in-game assets are not being loaded. This becomes an issue if you then proceed to save the area in question, since it will rewrite things and probably destroy the things which had the incorrect data, entirely.
       
Post is unread #5 Feb 28, 2014, 9:20 am   Last edited Feb 28, 2014, 9:28 am by ayuri
Go to the top of the page
Go to the bottom of the page

ayuri
Magician
GroupMembers
Posts239
JoinedJun 13, 2008

I don't think any in-game assets are not being loaded or corrupt.

If that was the case, in room 2 - puff would not exist, nor would all its progs.
Limbo                                                      -     N     -
-<---- Vnum:      2 ----------------------------->-        -<---(*)--->-
                                                           -     -     -

[Exits: North]
+-----------+ You float in a formless void, detached from all sensation of
|   : : :   | physical matter, surrounded by swirling glowing light which
|    \|/    | fades into the relative darkness around you without any trace
|   :-:-:   | of edge or shadow.
|     |     |
|     @     |
|           |
|           |
|           |
|           |
+-----------+
(Magical) A mystical spring flows majestically from a glowing circle of blue.
A fountain of fresh blood flows in the corner.
Puff the Fractal Dragon is here, contemplating a higher reality.
Puff glows with an aura of divine radiance.

<49hp 145m 110mv> <#2> time
It is 2 o'clock am, Day of the Great Gods, 20th day in the Month of the Dragon.
It is the season of autumn, in the year 622.
The mud started up at  :   Fri Feb 28 12:10:03 2014


Here's the snippet from the logfile when the game was starting up:
Fri Feb 28 12:10:03 2014 :: [*****] BUG: fread_fuss_mobile: unknown word: Vnum
Fri Feb 28 12:10:03 2014 :: [*****] FILE: limbo.are LINE: 16
Fri Feb 28 12:10:03 2014 :: [*****] BUG: fread_fuss_mobprog: unknown word: Progtype
Fri Feb 28 12:10:03 2014 :: [*****] FILE: limbo.are LINE: 41
Fri Feb 28 12:10:03 2014 :: [*****] BUG: fread_fuss_mobprog: unknown word: Arglist
Fri Feb 28 12:10:03 2014 :: [*****] FILE: limbo.are LINE: 42
Fri Feb 28 12:10:03 2014 :: [*****] BUG: fread_fuss_mobprog: unknown word: Progtype
Fri Feb 28 12:10:03 2014 :: [*****] FILE: limbo.are LINE: 48
Fri Feb 28 12:10:03 2014 :: [*****] BUG: fread_fuss_mobprog: unknown word: Arglist


Here's the whole section of code from the loading of mobs from smaugfuss1.9 (function fread_fuss_mobile):
void fread_fuss_mobile( FILE * fp, AREA_DATA * tarea )
{
   MOB_INDEX_DATA *pMobIndex = NULL;
   bool oldmob = false;
   bool fMatch;   // Unused, but needed to shut the compiler up about the KEY macro

   for( ;; )
   {
      const char *word = ( feof( fp ) ? "#ENDMOBILE" : fread_word( fp ) );
      char flag[MAX_INPUT_LENGTH];
      int value = 0;

      if( word[0] == '\0' )
      {
         log_printf( "%s: EOF encountered reading file!", __FUNCTION__ );
         word = "#ENDMOBILE";
      }

      switch ( word[0] )
      {
         default:
            log_printf( "%s: no match: %s", __FUNCTION__, word );
            fread_to_eol( fp );
            break;

         case '#':
            if( !str_cmp( word, "#MUDPROG" ) )
            {
               MPROG_DATA *mprg;
               CREATE( mprg, MPROG_DATA, 1 );
               fread_fuss_mobprog( fp, mprg, pMobIndex );
           if( pMobIndex->mudprogs )
           {
              MPROG_DATA *tmprog;

              for( tmprog = pMobIndex->mudprogs; tmprog->next; tmprog = tmprog->next );

              tmprog->next = mprg;
           }
           else
           {
              pMobIndex->mudprogs = mprg;
           }
           mprg->next = NULL;

//               mprg->next = pMobIndex->mudprogs;
//               pMobIndex->mudprogs = mprg;
               break;
            }

            if( !str_cmp( word, "#ENDMOBILE" ) )
            {
               if( !pMobIndex->long_descr )
                  pMobIndex->long_descr = STRALLOC( "" );
               if( !pMobIndex->description )
                  pMobIndex->description = STRALLOC( "" );

               if( !oldmob )
               {
                  int iHash = pMobIndex->vnum % MAX_KEY_HASH;
                  pMobIndex->next = mob_index_hash[iHash];
                  mob_index_hash[iHash] = pMobIndex;
                  ++top_mob_index;
               }
               return;
            }
            break;

         case 'A':
            if( !str_cmp( word, "Actflags" ) )
            {
               const char *actflags = NULL;

               actflags = fread_flagstring( fp );

               while( actflags[0] != '\0' )
               {
                  actflags = one_argument( actflags, flag );
                  value = get_actflag( flag );
                  if( value < 0 || value >= MAX_BITS )
                     bug( "Unknown actflag: %s", flag );
                  else
                     xSET_BIT( pMobIndex->act, value );
               }
               break;
            }

            if( !str_cmp( word, "Affected" ) )
            {
               const char *affectflags = NULL;

               affectflags = fread_flagstring( fp );

               while( affectflags[0] != '\0' )
               {
                  affectflags = one_argument( affectflags, flag );
                  value = get_aflag( flag );
                  if( value < 0 || value >= MAX_BITS )
                     bug( "Unknown affectflag: %s", flag );
                  else
                     xSET_BIT( pMobIndex->affected_by, value );
               }
               break;
            }

            if( !str_cmp( word, "Attacks" ) )
            {
               const char *attacks = fread_flagstring( fp );

               while( attacks[0] != '\0' )
               {
                  attacks = one_argument( attacks, flag );
                  value = get_attackflag( flag );
                  if( value < 0 || value >= MAX_BITS )
                     bug( "Unknown attackflag: %s", flag );
                  else
                     xSET_BIT( pMobIndex->attacks, value );
               }
               break;
            }

            if( !str_cmp( word, "Attribs" ) )
            {
               char *ln = fread_line( fp );
               int x1, x2, x3, x4, x5, x6, x7;

               x1 = x2 = x3 = x4 = x5 = x6 = x7 = 0;
               sscanf( ln, "%d %d %d %d %d %d %d", &x1, &x2, &x3, &x4, &x5, &x6, &x7 );

               pMobIndex->perm_str = x1;
               pMobIndex->perm_int = x2;
               pMobIndex->perm_wis = x3;
               pMobIndex->perm_dex = x4;
               pMobIndex->perm_con = x5;
               pMobIndex->perm_cha = x6;
               pMobIndex->perm_lck = x7;

               break;
            }
            break;

         case 'B':
            if( !str_cmp( word, "Bodyparts" ) )
            {
               const char *bodyparts = fread_flagstring( fp );

               while( bodyparts[0] != '\0' )
               {
                  bodyparts = one_argument( bodyparts, flag );
                  value = get_partflag( flag );
                  if( value < 0 || value > 31 )
                     bug( "Unknown bodypart: %s", flag );
                  else
                     SET_BIT( pMobIndex->xflags, 1 << value );
               }
               break;
            }
            break;

         case 'C':
            if( !str_cmp( word, "Class" ) )
            {
               short Class = get_npc_class( fread_flagstring( fp ) );

               if( Class < 0 || Class >= MAX_NPC_CLASS )
               {
                  bug( "%s: vnum %d: Mob has invalid Class! Defaulting to warrior.", __FUNCTION__, pMobIndex->vnum );
                  Class = get_npc_class( "warrior" );
               }

               pMobIndex->Class = Class;
               break;
            }
            break;

         case 'D':
            if( !str_cmp( word, "Defenses" ) )
            {
               const char *defenses = fread_flagstring( fp );

               while( defenses[0] != '\0' )
               {
                  defenses = one_argument( defenses, flag );
                  value = get_defenseflag( flag );
                  if( value < 0 || value >= MAX_BITS )
                     bug( "Unknown defenseflag: %s", flag );
                  else
                     xSET_BIT( pMobIndex->defenses, value );
               }
               break;
            }

            if( !str_cmp( word, "DefPos" ) )
            {
               short position = get_npc_position( fread_flagstring( fp ) );

               if( position < 0 || position > POS_DRAG )
               {
                  bug( "%s: vnum %d: Mobile in invalid default position! Defaulting to standing.", __FUNCTION__,
                       pMobIndex->vnum );
                  position = POS_STANDING;
               }
               pMobIndex->defposition = position;
               break;
            }

            KEY( "Desc", pMobIndex->description, fread_string( fp ) );
            break;

         case 'G':
            if( !str_cmp( word, "Gender" ) )
            {
               short sex = get_npc_sex( fread_flagstring( fp ) );

               if( sex < 0 || sex > SEX_FEMALE )
               {
                  bug( "%s: vnum %d: Mobile has invalid sex! Defaulting to neuter.", __FUNCTION__, pMobIndex->vnum );
                  sex = SEX_NEUTRAL;
               }
               pMobIndex->sex = sex;
               break;
            }
            break;

         case 'I':
            if( !str_cmp( word, "Immune" ) )
            {
               const char *immune = fread_flagstring( fp );

               while( immune[0] != '\0' )
               {
                  immune = one_argument( immune, flag );
                  value = get_risflag( flag );
                  if( value < 0 || value > 31 )
                     bug( "Unknown RIS flag (I): %s", flag );
                  else
                     SET_BIT( pMobIndex->immune, 1 << value );
               }
               break;
            }
            break;

         case 'K':
            KEY( "Keywords", pMobIndex->player_name, fread_string( fp ) );
            break;

         case 'L':
            KEY( "Long", pMobIndex->long_descr, fread_string( fp ) );
            break;

         case 'P':
            if( !str_cmp( word, "Position" ) )
            {
               short position = get_npc_position( fread_flagstring( fp ) );

               if( position < 0 || position > POS_DRAG )
               {
                  bug( "%s: vnum %d: Mobile in invalid position! Defaulting to standing.", __FUNCTION__, pMobIndex->vnum );
                  position = POS_STANDING;
               }
               pMobIndex->position = position;
               break;
            }
            break;

         case 'R':
            if( !str_cmp( word, "Race" ) )
            {
               short race = get_npc_race( fread_flagstring( fp ) );

               if( race < 0 || race >= MAX_NPC_RACE )
               {
                  bug( "%s: vnum %d: Mob has invalid race! Defaulting to monster.", __FUNCTION__, pMobIndex->vnum );
                  race = get_npc_race( "monster" );
               }

               pMobIndex->race = race;
               break;
            }

            if( !str_cmp( word, "RepairData" ) )
            {
               int iFix;
               REPAIR_DATA *rShop;

               CREATE( rShop, REPAIR_DATA, 1 );
               rShop->keeper = pMobIndex->vnum;
               for( iFix = 0; iFix < MAX_FIX; ++iFix )
                  rShop->fix_type[iFix] = fread_number( fp );
               rShop->profit_fix = fread_number( fp );
               rShop->shop_type = fread_number( fp );
               rShop->open_hour = fread_number( fp );
               rShop->close_hour = fread_number( fp );

               pMobIndex->rShop = rShop;
               LINK( rShop, first_repair, last_repair, next, prev );
               ++top_repair;

               break;
            }

            if( !str_cmp( word, "Resist" ) )
            {
               const char *resist = fread_flagstring( fp );

               while( resist[0] != '\0' )
               {
                  resist = one_argument( resist, flag );
                  value = get_risflag( flag );
                  if( value < 0 || value > 31 )
                     bug( "Unknown RIS flag (R): %s", flag );
                  else
                     SET_BIT( pMobIndex->resistant, 1 << value );
               }
               break;
            }
            break;

         case 'S':
            if( !str_cmp( word, "Saves" ) )
            {
               char *ln = fread_line( fp );
               int x1, x2, x3, x4, x5;

               x1 = x2 = x3 = x4 = x5 = 0;
               sscanf( ln, "%d %d %d %d %d", &x1, &x2, &x3, &x4, &x5 );

               pMobIndex->saving_poison_death = x1;
               pMobIndex->saving_wand = x2;
               pMobIndex->saving_para_petri = x3;
               pMobIndex->saving_breath = x4;
               pMobIndex->saving_spell_staff = x5;

               break;
            }

            KEY( "Short", pMobIndex->short_descr, fread_string( fp ) );

            if( !str_cmp( word, "ShopData" ) )
            {
               int iTrade;
               SHOP_DATA *pShop;

               CREATE( pShop, SHOP_DATA, 1 );
               pShop->keeper = pMobIndex->vnum;
               for( iTrade = 0; iTrade < MAX_TRADE; ++iTrade )
                  pShop->buy_type[iTrade] = fread_number( fp );
               pShop->profit_buy = fread_number( fp );
               pShop->profit_sell = fread_number( fp );
               pShop->profit_buy = URANGE( pShop->profit_sell + 5, pShop->profit_buy, 1000 );
               pShop->profit_sell = URANGE( 0, pShop->profit_sell, pShop->profit_buy - 5 );
               pShop->open_hour = fread_number( fp );
               pShop->close_hour = fread_number( fp );

               pMobIndex->pShop = pShop;
               LINK( pShop, first_shop, last_shop, next, prev );
               ++top_shop;

               break;
            }

            if( !str_cmp( word, "Speaks" ) )
            {
               const char *speaks = fread_flagstring( fp );

               while( speaks[0] != '\0' )
               {
                  speaks = one_argument( speaks, flag );
                  value = get_langnum( flag );
                  if( value < 0 || value > 31 )
                     bug( "Unknown speaks language: %s", flag );
                  else
                     SET_BIT( pMobIndex->speaks, 1 << value );
               }

               if( !pMobIndex->speaks )
                  pMobIndex->speaks = LANG_COMMON;
               break;
            }

            if( !str_cmp( word, "Speaking" ) )
            {
               const char *speaking = fread_flagstring( fp );

               while( speaking[0] != '\0' )
               {
                  speaking = one_argument( speaking, flag );
                  value = get_langnum( flag );
                  if( value < 0 || value > 31 )
                     bug( "Unknown speaking language: %s", flag );
          	      else
                     SET_BIT( pMobIndex->speaking, 1 << value );
               }

               if( !pMobIndex->speaking )
                  pMobIndex->speaking = LANG_COMMON;
               break;
            }

            if( !str_cmp( word, "Specfun" ) )
            {
               const char *temp = fread_flagstring( fp );
               if( !pMobIndex )
               {
                  bug( "%s: Specfun: Invalid mob vnum!", __FUNCTION__ );
                  break;
               }
               if( !( pMobIndex->spec_fun = spec_lookup( temp ) ) )
               {
                  bug( "%s: Specfun: vnum %d, no spec_fun called %s.", __FUNCTION__, pMobIndex->vnum, temp );
                  pMobIndex->spec_funname = NULL;
               }
               else
                  pMobIndex->spec_funname = STRALLOC( temp );
               break;
            }

            if( !str_cmp( word, "Stats1" ) )
            {
               char *ln = fread_line( fp );
               int x1, x2, x3, x4, x5, x6;

               x1 = x2 = x3 = x4 = x5 = x6 = 0;
               sscanf( ln, "%d %d %d %d %d %d", &x1, &x2, &x3, &x4, &x5, &x6 );

               pMobIndex->alignment = x1;
               pMobIndex->level = x2;
               pMobIndex->mobthac0 = x3;
               pMobIndex->ac = x4;
               pMobIndex->gold = x5;
               pMobIndex->exp = x6;

               break;
            }

            if( !str_cmp( word, "Stats2" ) )
            {
               char *ln = fread_line( fp );
               int x1, x2, x3;
               x1 = x2 = x3 = 0;
               sscanf( ln, "%d %d %d", &x1, &x2, &x3 );

               pMobIndex->hitnodice = x1;
               pMobIndex->hitsizedice = x2;
               pMobIndex->hitplus = x3;

               break;
            }

            if( !str_cmp( word, "Stats3" ) )
            {
               char *ln = fread_line( fp );
               int x1, x2, x3;
               x1 = x2 = x3 = 0;
               sscanf( ln, "%d %d %d", &x1, &x2, &x3 );

               pMobIndex->damnodice = x1;
               pMobIndex->damsizedice = x2;
               pMobIndex->damplus = x3;

               break;
            }

            if( !str_cmp( word, "Stats4" ) )
            {
               char *ln = fread_line( fp );
               int x1, x2, x3, x4, x5;

               x1 = x2 = x3 = x4 = x5 = 0;
               sscanf( ln, "%d %d %d %d %d", &x1, &x2, &x3, &x4, &x5 );

               pMobIndex->height = x1;
               pMobIndex->weight = x2;
               pMobIndex->numattacks = x3;
               pMobIndex->hitroll = x4;
               pMobIndex->damroll = x5;

               break;
            }

            if( !str_cmp( word, "Suscept" ) )
            {
               const char *suscep = fread_flagstring( fp );

               while( suscep[0] != '\0' )
               {
                  suscep = one_argument( suscep, flag );
                  value = get_risflag( flag );
                  if( value < 0 || value > 31 )
                     bug( "Unknown RIS flag (S): %s", flag );
                  else
                     SET_BIT( pMobIndex->susceptible, 1 << value );
               }
               break;
            }
            break;

         case 'V':
            if( !str_cmp( word, "Vnum" ) )
            {
               bool tmpBootDb = fBootDb;
               fBootDb = false;

               int vnum = fread_number( fp );

               if( get_mob_index( vnum ) )
               {
                  if( tmpBootDb )
                  {
                     fBootDb = tmpBootDb;
                     bug( "%s: vnum %d duplicated.", __FUNCTION__, vnum );

                     // Try to recover, read to end of duplicated mobile and then bail out
                     for( ;; )
                     {
                        word = feof( fp ) ? "#ENDMOBILE" : fread_word( fp );

                        if( !str_cmp( word, "#ENDMOBILE" ) )
                           return;
                     }
                  }
                  else
                  {
                     pMobIndex = get_mob_index( vnum );
                     log_printf_plus( LOG_BUILD, sysdata.build_level, "Cleaning mobile: %d", vnum );
                     clean_mob( pMobIndex );
                     oldmob = true;
                  }
               }
               else
               {
                  CREATE( pMobIndex, MOB_INDEX_DATA, 1 );
                  oldmob = false;
               }
               pMobIndex->vnum = vnum;
               fBootDb = tmpBootDb;

               if( fBootDb )
               {
                  if( !tarea->low_m_vnum )
                     tarea->low_m_vnum = vnum;
                  if( vnum > tarea->hi_m_vnum )
                     tarea->hi_m_vnum = vnum;
               }
               break;
            }
            break;
      }
      if( !fMatch )
         bug( "%s: unknown word: %s", __FUNCTION__, word );
   }
}


So, lets change the bug message from bug( "%s: unknown word: %s", __FUNCTION__, word ); to bug( "%s: unknown word AYURI_MOB_TEST: %s", __FUNCTION__, word );

And results:
Fri Feb 28 12:17:34 2014 :: [*****] BUG: fread_fuss_mobile: unknown word AYURI_MOB_TEST: Vnum
Fri Feb 28 12:17:34 2014 :: [*****] FILE: limbo.are LINE: 16

Puff is still in vnum 2, running about and doing whatever it is that Puff does.


Again, the above is from an un-modified smaugfuss1.9 that I pulled last night.
**Edit - looks like it only pops out the vnum error for the first mob it finds in the area file. Also whole bunch of errors for direction, arglist, progtype for the areas as well, but they seem to repeat. *shrug*. Still think it has to do with a bit of untidiness all in all.

ayuri
       
Post is unread #6 Mar 1, 2014, 6:36 pm
Go to the top of the page
Go to the bottom of the page

Quixadhal
Conjurer
GroupMembers
Posts398
JoinedMar 8, 2005

So, basically, fmatch is not being set to true when a valid match is found and processed...
       
Post is unread #7 Mar 6, 2014, 3:06 am   Last edited Mar 6, 2014, 3:07 am by Remcon
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,857
JoinedJul 26, 2005

This is probably my fault lol, newer compilers complain about things that are set and not used, so I probably put the messages back in to warn about invalid things. I'll try to fix it up this weekend thanks for letting me know :)
       
Post is unread #8 Mar 6, 2014, 9:23 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,857
JoinedJul 26, 2005

Ok, think I have those fixed now, sorry :)
       
Pages:<< prev 1 next >>