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, DotBot, Yandex, joeyfogas

Members: 1
Guests: 8
Stats
Files
Topics
Posts
Members
Newest Member
481
3,735
19,368
618
Micheal64X
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Smaug Snippets » Connect snippet
Forum Rules | Mark all | Recent Posts

Connect snippet
< Newer Topic :: Older Topic > Odd but significant bug

Pages:<< prev 1 next >>
Post is unread #1 Dec 3, 2005, 1:32 am
Go to the top of the page
Go to the bottom of the page

Cernunnos

GroupMembers
Posts5
JoinedOct 2, 2005

Alright, so I've had the item connection snippet successfully installed and functioning for quite some time now, however a peculiar bug has recently come to light.

When you connect item1 and item2, all instances of those items are removed from your inventory, rather than just one of each. So for example if you have two of item1 and one of item2, you'd lose all three by connecting the items.

I would think this is just a one-line type of deal in the snippet code, unfortunately I'm not particularly proficient - I mostly just install snippets while our coder is on vacation. Heh.

Any help would be appreciated.
       
Post is unread #2 Dec 3, 2005, 3:07 pm   Last edited Dec 3, 2005, 3:08 pm by Conner
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

I'd try out the suggestion Zeno posted in response to this on Gammon's forums, and then let us know if it solved the problem for you. ;)

You just need to add the line:

separate( obj );

Before the item extracts in the code. You'll need to do that code for both the connect items.
       
Post is unread #3 Dec 3, 2005, 3:58 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,873
JoinedJul 26, 2005

yep, you have to seperate each object that is being used so that it doesn't extract all of the objects.
       
Post is unread #4 Dec 5, 2005, 7:51 pm
Go to the top of the page
Go to the bottom of the page

Cernunnos

GroupMembers
Posts5
JoinedOct 2, 2005

I've done that, and now I get the following errors when compiling...


act_obj.c: In function `do_connect':
act_obj.c:3297: warning: implicit declaration of function `seperate'
act_obj.c:3297: `obj' undeclared (first use in this function)
act_obj.c:3297: (Each undeclared identifier is reported only once
act_obj.c:3297: for each function it appears in.)
act_obj.c:3259: warning: unused variable `buf'
make[1]: *** [o/act_obj.o] Error 1
make: *** [all] Error 2


I should note I've upgraded to FUSS 1.6 since I posted this a few days ago.
       
Post is unread #5 Dec 5, 2005, 8:10 pm
Go to the top of the page
Go to the bottom of the page

Cernunnos

GroupMembers
Posts5
JoinedOct 2, 2005

I got rid of the unused variable, so ignore that part. The line I added to seperate the objects though...
       
Post is unread #6 Dec 5, 2005, 11:31 pm
Go to the top of the page
Go to the bottom of the page

Marhis

GroupMembers
Posts6
JoinedSep 22, 2004

Cernunnos said:

act_obj.c:3297: warning: implicit declaration of function `seperate'


I think it's a typo: separate and not seperate.
       
Post is unread #7 Dec 6, 2005, 6:57 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,873
JoinedJul 26, 2005

Yea it was a typo :) and it should be done like this
         separate_obj( obj );

With the ( obj ) being what ever the object is that your wanting to separate.
       
Pages:<< prev 1 next >>