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

Members: 0
Guests: 12
Stats
Files
Topics
Posts
Members
Newest Member
481
3,739
19,386
625
OmarHarrim
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Smaug Snippets » Finger Snippet V3
Forum Rules | Mark all | Recent Posts

Finger Snippet V3
< Newer Topic :: Older Topic > Installed but have some errors, hel

Pages:<< prev 1 next >>
Post is unread #1 Jun 8, 2003, 9:48 pm
Go to the top of the page
Go to the bottom of the page

Greyson

GroupMembers
Posts5
JoinedMay 31, 2003

Ok, after a bit of frustration I managed to get finger v3 installed into an SWR codebase. Turns out it was missing a few headers at the top of the finger file, and had to make a couple other odd changes for SWR. Like level to top_level, no idea what made em go and change that. Anyway I got it installed, and it works, but I still have a problem I can't get rid of.

On compile where it calls build_wizinfo as it's loading up:
db.c: In function `boot_db':
db.c:491: warning: implicit declaration of function `build_wizinfo'

I was lucky to get it this far so any help would be greatly appreciated.
       
Post is unread #2 Jun 9, 2003, 7:47 am   Last edited Nov 24, 2007, 4:26 pm by Samson
Go to the top of the page
Go to the bottom of the page

Xorith
The Null Value
GroupAFKMud Team
Posts254
JoinedFeb 23, 2003

Check your instructions - is build_wizinfo a part of the Finger snippet?

If it is, then you may need to place a prototype of that function at the top of your db.c. To do that, you need to know the return type and arguments of the function. You can find that by doing:
grep 'build_wizinfo' *.c *.h

You're looking for a line that has something like this:
Filename.x: void build_wizinfo(*args_if_any)

Copy that down, and then at the top of db.c:
void build_wizinfo(*args_if_any);

Note the semi-colon at the end of the above line. Please note that you should change void to the return type before the function grep returned, and the 'args_if_any' should be the argument list found, if any.

-- X
       
Post is unread #3 Jun 10, 2003, 1:56 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Well, I should certainly hope build_wizinfo is in there, it's supposed to be
       
Post is unread #4 Jun 10, 2003, 2:21 am   Last edited Nov 24, 2007, 4:27 pm by Samson
Go to the top of the page
Go to the bottom of the page

Greyson

GroupMembers
Posts5
JoinedMay 31, 2003

Thanks, I think that got it, I added

void build_wizinfo( bool bootup );

to the top of db.c and now it's compiling with no errors, everything seems to work alright now. I also had to make it write "End" to the godfiles and a check for that I had to change this in build_wizinfo in finger.c

from:
 if ( fp )
 {
   CREATE( wiz, WIZINFO_DATA, 1 );
   fread_info( wiz, fp );
   add_to_wizinfo( dentry->d_name, wiz );
   FCLOSE( fp );
 }

to:
 if ( fp )
 {
*  word = feof( fp ) ? "End" : fread_word( fp );
   CREATE( wiz, WIZINFO_DATA, 1 );
   fread_info( wiz, fp );
   add_to_wizinfo( dentry->d_name, wiz );
* if ( !str_cmp( word, "End" ) )
*    return;
   FCLOSE( fp );
 }


The *'s show what I changed. I had to do that cause it was giving me EOF errors in the game. I don't know if that'll hurt anything, I copied it from someplace else in the code. But it did get rid of the error, and everything seems to work fine now. Thought I would add that in case someone else is trying to get it to work with SWR. If that'll cause problems please let me know. I'm pretty new to coding and don't trust my own work yet.

I also had to add a couple includes... but I can't remember which ones I added now.
       
Pages:<< prev 1 next >>