Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
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

Members: 0
Guests: 7
Stats
Files
Topics
Posts
Members
Newest Member
481
3,739
19,386
622
ignatius
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » make_obj doesn't copy all val...
Forum Rules | Mark all | Recent Posts

make_obj doesn't copy all values
< Newer Topic :: Older Topic > make_obj doesn't copy all values

Pages:<< prev 1 next >>
Post is unread #1 Jun 11, 2003, 7:51 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,874
JoinedJul 26, 2005

in db.c find make_obj and then
find these lines:

   pObjIndex->value[0]  = 0;
   pObjIndex->value[1]  = 0;
   pObjIndex->value[2]  = 0;
   pObjIndex->value[3]  = 0;

add these lines:
   pObjIndex->value[4]  = 0;
   pObjIndex->value[5]  = 0;

futher down in make_obj
find these lines:

   pObjIndex->value[0]  = cObjIndex->value[0];
   pObjIndex->value[1]  = cObjIndex->value[1];
   pObjIndex->value[2]  = cObjIndex->value[2];
   pObjIndex->value[3]  = cObjIndex->value[3];

add these lines:

   pObjIndex->value[4]  = cObjIndex->value[4];
   pObjIndex->value[5]  = cObjIndex->value[5];


This might have been found and reported by someone at some point and time, but I just happened to run accross it today.
       
Post is unread #2 Jun 12, 2003, 1:47 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Technically not a bug, but a good find just the same. The values for the ones it doesn't set will almost always be a 0 anyway, but it's good practice to initialize them to known values for debugging down the road.
       
Post is unread #3 Jun 12, 2003, 7:51 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,874
JoinedJul 26, 2005

thats true unless you have added like the updated weapon code which uses value4 for weapon types heh (thats where I noticed the problem) I looked at your latest code and afk I know has it fixed at least in the newest version and probably since whenever you added 6-10 to the values :)
       
Pages:<< prev 1 next >>