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

Members: 0
Guests: 5
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 » SmaugFUSS » Slight issue nothing major :)
Forum Rules | Mark all | Recent Posts

Slight issue nothing major :)
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Aug 6, 2005, 1:31 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,868
JoinedJul 26, 2005

in save.c find
Setting bad default mod
            if( !strcmp( word, "AttrMod" ) )
            {
               line = fread_line( fp );
               x1 = x2 = x3 = x4 = x5 = x6 = x7 = 13;
               sscanf( line, "%d %d %d %d %d %d %d", &x1, &x2, &x3, &x4, &x5, &x6, &x7 );
               ch->mod_str = x1;
               ch->mod_int = x2;
               ch->mod_wis = x3;
               ch->mod_dex = x4;
               ch->mod_con = x5;
               ch->mod_cha = x6;
               ch->mod_lck = x7;
               if( !x7 )
                  ch->mod_lck = 0;
               fMatch = TRUE;
               break;
            }

I suggest changing
              x1 = x2 = x3 = x4 = x5 = x6 = x7 = 13;

To this
              x1 = x2 = x3 = x4 = x5 = x6 = x7 = 0;

You can also change
               ch->mod_lck = x7;
               if( !x7 )
                  ch->mod_lck = 0;

to one of these
               ch->mod_lck = x7;

or
               if( !x7 )
                  ch->mod_lck = 0;
               else
                 ch->mod_lck = x7;


Setting bad default perm
            if( !strcmp( word, "AttrPerm" ) )
            {
               line = fread_line( fp );
               x1 = x2 = x3 = x4 = x5 = x6 = x7 = 0;
               sscanf( line, "%d %d %d %d %d %d %d", &x1, &x2, &x3, &x4, &x5, &x6, &x7 );
               ch->perm_str = x1;
               ch->perm_int = x2;
               ch->perm_wis = x3;
               ch->perm_dex = x4;
               ch->perm_con = x5;
               ch->perm_cha = x6;
               ch->perm_lck = x7;
               if( !x7 || x7 == 0 )
                  ch->perm_lck = 13;
               fMatch = TRUE;
               break;
            }

theres a couple of ways you could fix it depending on what you want lets assume you want it to default at 13 since thats what they are going to set luck to if it is 0 lol
so do this
change
              x1 = x2 = x3 = x4 = x5 = x6 = x7 = 0;

to
              x1 = x2 = x3 = x4 = x5 = x6 = x7 = 13;

change
               ch->perm_lck = x7;
               if( !x7 || x7 == 0 )
                  ch->perm_lck = 13;

to
               if( !x7 || x7 == 0 )
                 ch->perm_lck = 13;
               else
                 ch->perm_lck = x7;

Personaly i took out the if checks because they are set already anyways and it should find those in new pfiles anyways lol just thought id pass on the info.
       
Pages:<< prev 1 next >>