Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Development
Nov 28, 2018, 10:10 am
By Keirath
First Immortal
Oct 12, 2018, 12:02 pm
By GatewaySysop
Bug in do_climb( )
Jun 5, 2018, 5:31 pm
By joeyfogas
question on overland code
May 31, 2018, 10:03 am
By joeyfogas
KaVir's Protocol Snip
May 15, 2018, 7:57 pm
By joeyfogas
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Bing, DotBot, Yandex

Members: 0
Guests: 6
Stats
Files
Topics
Posts
Members
Newest Member
481
3,740
19,397
636
Van1406890
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,874
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 >>