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, Sogou, DotBot

Members: 0
Guests: 6
Stats
Files
Topics
Posts
Members
Newest Member
481
3,734
19,366
618
Micheal64X
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Smaug Snippets » Minorbug in do_connect
Forum Rules | Mark all | Recent Posts

Minorbug in do_connect
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jul 28, 2006, 12:40 am
Go to the top of the page
Go to the bottom of the page

midgetroo

GroupMembers
Posts1
JoinedJul 28, 2006

i dunno if you guys have posted about this, its a sorta silly minor error in misc.c , do_connect

if( !( new_ob = create_object( get_obj_index( first_ob->value[2] ),
ch->level ) ) )



should be

if( !( new_ob = create_object( get_obj_index( first_ob->value[1] ),
ch->level ) ) )
       
Post is unread #2 Jul 29, 2006, 10:52 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

According to the usage instructions which came with the original snippet code:

Usage:
Using the OLC assign the item a type ITEM_PIECE and assign the following
to the values

Value0 = Previous item vnum
Value1 = Next item vnum
Value2 = Final Obj vnum

For example you have 3 items top(200) bottom(201) and staff(202)

200 would have v1 = 201
v2 = 202

201 would have v0 = 200
v2 = 202

202 is the final product


Using the value[2] field is correct and this is not an actual bug. What the connect code is trying to do in the line you show is to produce the final product, not an intermediate step in generating it.
       
Post is unread #3 Jul 29, 2006, 10:55 am   Last edited Jul 29, 2006, 11:00 am by Samson
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

However, the instructions included are actually incorrect as far as the code implementation. value[0] on the first object holds the vnum of the second object. value[0] on the second object holds the vnum of the first. The instructions should actually read as such:


Usage:
Using the OLC assign the item a type ITEM_PIECE and assign the following
to the values

Value0 = Item piece to connect with
Value2 = Final product vnum

For example you have 3 items top(200) bottom(201) and staff(202)

200 would have v0 = 201
v2 = 202

201 would have v0 = 200
v2 = 202

202 is the final product


Applying this change to the instructions now matches the code. Should be noted that this only applies to the implementation of it in AFKMud. The original snippet is not affected by this as it contains some extra checks on the item numbers.
       
Pages:<< prev 1 next >>