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, Majestic-12, Yandex

Members: 0
Guests: 3
Stats
Files
Topics
Posts
Members
Newest Member
481
3,734
19,366
618
Micheal64X
Today's Birthdays
Vintar (28)
Related Links
» SmaugMuds.org » General » Smaug Snippets » Not sure exactly what this is.
Forum Rules | Mark all | Recent Posts

Not sure exactly what this is.
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Feb 20, 2003, 9:09 am
Go to the top of the page
Go to the bottom of the page

Pharas

GroupMembers
Posts27
JoinedMay 22, 2002

Installing your overland code and ran into this. Implicit declaration of get_terrain in act_wiz.c, so i figured I would check and see if you had a define for it somewhere else and you did. In the code to be added to update.c you had int get_terrain and in overland.c you had sh_int get terrain now which is it supposed to be int or sh_int? And wouldn't it cause errors being like that?
       
Post is unread #2 Feb 20, 2003, 11:55 pm
Go to the top of the page
Go to the bottom of the page

Guest - (Unregistered)

Implicit declaration of get_terrain in act_wiz.c, so i figured I would check and see if you had a define for it somewhere else and you did. In the code to be added to update.c you had int get_terrain and in overland.c you had sh_int get terrain now which is it supposed to be int or sh_int? And wouldn't it cause errors being like that?

Firstly you're looking for a prototype, not a define.

As with update.c at the top of act_wiz.c below the #include block add the line
sh_int get_terrain( int map, int x, int y );

That'll get rid of your error.

Your point about update.c is a minor one, it might produce a warning, but nothing more serious as a sh_int and int only differ in size (sh_int only being a typedef for a short int I believe). Ideally the update.c prototype should read as the one I included above for act_wiz.c

But no, datatypes have absolutely no bearing on implicit declerations unless you make such a serious blunder that the syntax of prototype is wrong and the compiler rejects it out of the symbol table. You'd have got quite a diff message if the dataypes didn't match.

I don't know the Overland code, I only just downloaded it now to check what you said and to get the prototype for get_terrain(), this is a general C thing though. You must have a prototype indicating call syntax or a function in existance within the file before you use a function.
       
Post is unread #3 Feb 21, 2003, 5:51 am
Go to the top of the page
Go to the bottom of the page

Pharas

GroupMembers
Posts27
JoinedMay 22, 2002

thanks for the info.
       
Pages:<< prev 1 next >>