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, Bing, Yandex

Members: 0
Guests: 14
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 » Roster - Problems
Forum Rules | Mark all | Recent Posts

Roster - Problems
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jan 4, 2006, 4:30 pm   Last edited Nov 25, 2007, 7:00 pm by Samson
Go to the top of the page
Go to the bottom of the page

Samryn

GroupMembers
Posts11
JoinedJul 10, 2004

I was wondering if anyone can help out on this, im trying to put the snippet "roster" in from smaugmuds.org but keep recieving errors... i cant put my finger on it, so i was wondering if anyone can help me out?

clans.c: In function `fread_memberlist':
clans.c:258: warning: implicit declaration of function `KEY'
rm -f smaug
gcc -lcrypt -o smaug act_comm.o act_info.o act_move.o act_obj.o act_wiz.o boards.o build.o clans.o comm.o comments.o const.o db.o deity.o fight.o handler.o hashstr.o ibuild.o ident.o interp.o magic.o makeobjs.o mapout.o misc.o mpxset.o mud_comm.o mud_prog.o player.o polymorph.o requests.o reset.o save.o shops.o skills.o special.o tables.o track.o update.o grub.o stat_obj.o ban.o services.o planes.o imm_host.o colorize.o extra.o
clans.o: In function `fread_memberlist':
/usr/users/mud/leilia/bport/src/clans.c:282: undefined reference to `KEY'
collect2: ld returned 1 exit status

(this is the error im recieving)
It seems to be complaining about the following lines:
case 'D':
KEY( "Deaths", roster->deaths, fread_number( fp ) );
break;

case 'N':
KEY( "Name", roster->name, fread_string( fp ) );
break;

Anyone got any ideas?
       
Post is unread #2 Jan 4, 2006, 6:58 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Your copy of Smaug is sufficiently old that the KEY macro has not been moved to mud.h yet. Find another one of your files, like db.c, and find the spot where it does the KEY macro definition and copy it into your clans.c. Either than or you need to find where in clans.c that definition is done and move it up futher so the roster code can see it.
       
Post is unread #3 Jan 6, 2006, 12:48 pm
Go to the top of the page
Go to the bottom of the page

Samryn

GroupMembers
Posts11
JoinedJul 10, 2004

Ok the copying of the KEY macro worked...
So thanks Samson for sorting that wee problem out... But now it seems i've stumbed upon a even more confusing bug... any ideas what happening?

Everything seems to work fine until a player logs on and then i recieve:

Log: [*****] BUG: Str_cmp: null bstr.

When i type roster <order> i recieve this:

(null) Cleric 50 1 0 Fri Jan 6 14:36:29 2006
(null) Vampire 62 2 0 Fri Jan 6 14:36:29 2006
etc...

Because of it only doing it when a player logs in i've looked at update_roster and the only thing i can think of is:

if( !str_cmp( ch->name, roster->name ) )

Isn't picking the characters name from it, i might be going totally down the wrong track so hence me asking on here incase anyone had a similar problem?

Thanks
       
Post is unread #4 Jan 7, 2006, 12:47 pm
Go to the top of the page
Go to the bottom of the page

Samryn

GroupMembers
Posts11
JoinedJul 10, 2004

I worked out what it was, i forgotten that when i was looking at the KEY macro i commented something out to test it... it so happens i forgotten to take the comments out. bit of a dumb thing to forget but hey...

Thanks again Samson.
       
Post is unread #5 Jan 7, 2006, 7:39 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

That's the kind of mistake we all make, but thanks for posting a follow up to let the rest of us know what the problem turned out to be along with the solution so others can avoid similiar issues in the future. :)
       
Post is unread #6 Jan 9, 2006, 4:09 pm   Last edited Jan 9, 2006, 4:12 pm by Samryn
Go to the top of the page
Go to the bottom of the page

Samryn

GroupMembers
Posts11
JoinedJul 10, 2004

Just a wee warning for the roster snippet...

When your installing the snippet, it uses NPC_CLASS which means its using the mobiles classes to get the information from, e.i. if its class number 11 it will become a pirate even if you have decided to add a new class called something else.

A way around this (and i might add, it probably could be improved) is using:
roster->class == 0 ? "Mage" :
roster->class == 1 ? "Cleric" :
etc etc...

You would place this is the do_roster part, search for:
ch_printf( ch, "Membership roster

And you should be placed _near_ it.

Then simple change the npc_class[roster->class] into the previous bit.

This will allow you to put your names in instead of using NPC_CLASS.
Like i said, this could probably be fixed a better way, but i was coding this somewhere around midnight so yeh...
It all works if you do it correctly.

Hope this helps people out if they have any roster problem like this.
       
Pages:<< prev 1 next >>