Saving equipment bug?

Posted by Oblisgr on Fri 10 Jul 2020 08:12 PM — 5 posts, 19,226 views.

#0
I face a strange bug.

I run both servers (from local computer and one online)
They have the exact same files.

The local mud saves player's equipment and inventory properly on server restart.

The on line server will not save neither equipment nor inventory.

I checked the file permitions and write/read/execute are enabled.

What is happening?
Australia Forum Administrator #1
It sounds like the player files are not being saved. Perhaps you don't have write permissions to the folder the files are in.
#2
Eh just to be sure i have made all files and folder in the server read/write/execute. From the starting folder. The problem keeps.

The strange thing is that it saves skills and other data. It has problem only with equipment. I thought that it could be a problem in save.c but since it works in my local computer i dont think it is from there.

This is the permitions for the folders a-z in the player file. Maybe i m mistaken but i dont think.


drwxrwxrwx 2 oblisgr oblisgr 4096 Jul 10 07:58 a
drwxrwxrwx 2 oblisgr oblisgr 4096 Jun  8 14:53 b
drwxrwxrwx 2 oblisgr oblisgr 4096 Jul  9 23:46 c
drwxrwxrwx 2 oblisgr oblisgr 4096 Jun  8 14:54 d
drwxrwxrwx 2 oblisgr oblisgr 4096 Jun  8 14:54 e
drwxrwxrwx 2 oblisgr oblisgr 4096 Jul  9 16:02 f
drwxrwxrwx 2 oblisgr oblisgr 4096 Jun  8 14:54 g
drwxrwxrwx 2 oblisgr oblisgr 4096 Jul  9 17:35 h
drwxrwxrwx 2 oblisgr oblisgr 4096 Jun  8 14:54 i
drwxrwxrwx 2 oblisgr oblisgr 4096 Jul 10 08:06 j
drwxrwxrwx 2 oblisgr oblisgr 4096 Jul  9 17:56 k
drwxrwxrwx 2 oblisgr oblisgr 4096 Jul  9 21:22 l
drwxrwxrwx 2 oblisgr oblisgr 4096 Jul 11 02:10 m
drwxrwxrwx 2 oblisgr oblisgr 4096 Jun 10 19:04 n
drwxrwxrwx 2 oblisgr oblisgr 4096 Jun  9 00:37 o
drwxrwxrwx 2 oblisgr oblisgr 4096 Jul  9 22:36 p
drwxrwxrwx 2 oblisgr oblisgr 4096 Jun  8 14:54 q
drwxrwxrwx 2 oblisgr oblisgr 4096 Jun  8 14:54 r
drwxrwxrwx 2 oblisgr oblisgr 4096 Jul  9 23:42 s
drwxrwxrwx 2 oblisgr oblisgr 4096 Jun  8 14:54 t
drwxrwxrwx 2 oblisgr oblisgr 4096 Jun  8 14:54 u
drwxrwxrwx 2 oblisgr oblisgr 4096 Jul  9 21:02 v
drwxrwxrwx 2 oblisgr oblisgr 4096 Jun  8 14:54 w
drwxrwxrwx 2 oblisgr oblisgr 4096 Jun  8 14:54 x
drwxrwxrwx 2 oblisgr oblisgr 4096 Jun  8 14:54 y
drwxrwxrwx 2 oblisgr oblisgr 4096 Jun  8 23:48 z
#3
Actually found solution for my problem.

It seems that save command was not saving equipment of higher level than players level. Since in my server all items are available from level 1 (even if they are of higher level) the mud didnt saved them.

So i removed the check for item's level from save.c and how ignores the level and keeps them equipped.

Removed the 3rd if from here:


for( obj = ch->first_carrying; obj; obj = obj->next_content )
   {
      if( obj->wear_loc > -1 && obj->wear_loc < MAX_WEAR )
      {
         if( get_trust( ch ) >= obj->level )
         {
            for( x = 0; x < MAX_LAYERS; x++ )
            {
               if( IS_NPC( ch ) )
               {
                  if( !mob_save_equipment[obj->wear_loc][x] )
                  {
                     mob_save_equipment[obj->wear_loc][x] = obj;
                     break;
                  }
               }
               else
               {
                  if( !save_equipment[obj->wear_loc][x] )
                  {
                     save_equipment[obj->wear_loc][x] = obj;
                     break;
                  }
               }
            }
            if( x == MAX_LAYERS )
            {
               bug( "%s had on more than %d layers of clothing in one location (%d): %s",
                    ch->name, MAX_LAYERS, obj->wear_loc, obj->name );
            }
         }
      }


and the first check from this:


   if( !hotboot )
   {
      if( (ch && ch->level < obj->level)
         || ( obj->item_type == ITEM_KEY && !IS_OBJ_STAT( obj, ITEM_CLANOBJECT ) )
         || ( (os_type == OS_VAULT) && (obj->item_type == ITEM_CORPSE_PC) )
         || obj_extracted( obj )
         || IS_OBJ_STAT( obj, ITEM_PROTOTYPE ) )
      return;
   }
Amended on Sat 11 Jul 2020 08:51 AM by Oblisgr
Australia Forum Administrator #4
I'm glad you found it. Your initial post sort-of hinted that the only difference was where the server was, not that that nature of the data was different.