Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
 parse description bug
Yesterday, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Bing, DotBot, Yandex

Members: 0
Guests: 9
Stats
Files
Topics
Posts
Members
Newest Member
477
3,706
19,240
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » New Command problem
Forum Rules | Mark all | Recent Posts

New Command problem
< Newer Topic :: Older Topic > dynamic linking problem?

Pages:<< prev 1 next >>
Post is unread #1 Jul 3, 2011, 9:12 pm
Go to the top of the page
Go to the bottom of the page

NargsBrood
Fledgling
GroupMembers
Posts4
JoinedJul 3, 2011

I have an old mapper function i came across.

this function found in act_move.c:
void do_map ( CHAR_DATA * ch, char *argument ) {

i have this in mud.h
DECLARE_DO_FUN( do_map );



commands.dat shows
#COMMAND
Name map~
Code do_map
Position 100
Level 64
Log 0
End




I get this error message when i tried cedit create:
Log: [*****] BUG: Error locating do_map in symbol table. Resource temporarily unavailable
Command added.
Code do_map not found. Set to no code.

I get this error message when booting up the mud:
Sun Jul 3 18:43:52 2011 :: [*****] BUG: Error locating do_map in symbol table. No error
Sun Jul 3 18:43:52 2011 :: [*****] BUG: fread_command: Function do_map not found for map



an identical problem was discussed over at gammon.com but there was never a resolution.

since making changes I did 'make clean' and 'make' all compiles no problem. What am I missing?
http://www.gammon.com.au/forum/bbshowpost.php?id=8851&page=1

       
Post is unread #2 Jul 3, 2011, 10:42 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

If it's in commands.dat, you shouldn't have to cedit in in actually.

Make sure that do_map isn't commented out. Your mud.h line is right. You did a make clean which was needed.

That's all I can think of. Tables shouldn't be needed anymore, otherwise there would be 2 lines to add in tables.c

Try using cedit to change an existing commands code? Like cedit memory code do_wizlist
       
Post is unread #3 Jul 3, 2011, 11:00 pm
Go to the top of the page
Go to the bottom of the page

NargsBrood
Fledgling
GroupMembers
Posts4
JoinedJul 3, 2011

<28hp 103m 110mv> cedit memory code do_wizlist
Log: NargsBrood: cedit memory code do_wizlist
Done.

This one works okay. I added the new command via cedit and later checked the commands.dat to make sure the entry looked okay which it does.

       
Post is unread #4 Jul 4, 2011, 12:04 am
Go to the top of the page
Go to the bottom of the page

NargsBrood
Fledgling
GroupMembers
Posts4
JoinedJul 3, 2011

I am editing my files in visual studio 2008, saving, and then heading over to cygwin to compile.

I notice that if I copy an existing function and simply rename it and add the entry to mud.h then it works fine.
however, if i add a function from scratch and add the entry to mud.h then it does not work.

The only difference between copying an existing function and starting a new one from scratch that I can think of is the line breaks since I am modifying the files in windows. would that be enough to throw this thing into a tizzy?
       
Post is unread #5 Jul 4, 2011, 12:16 am   Last edited Jul 4, 2011, 12:17 am by NargsBrood
Go to the top of the page
Go to the bottom of the page

NargsBrood
Fledgling
GroupMembers
Posts4
JoinedJul 3, 2011

I happened to notice the header was "different" from other do functions. The difference being "const char* argument" rather than "char* argument"

I changed
void do_map ( CHAR_DATA * ch, char *argument )

to
void do_map ( CHAR_DATA * ch, const char* argument)

and now it works fine.

The char *argument worked in fuss 1.7 and I am now using 1.9.

The signature of do functions must have changed since 1.7?
       
Post is unread #6 Jul 4, 2011, 7:40 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,866
JoinedJul 26, 2005

Yea they started using the const on the start of functions a while back. :)
       
Post is unread #7 Jul 4, 2011, 11:14 am
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

It was actually a bug that got fixed. From the start the commands should havebeen const char* not char*. It just took a while for anyone to catch it, and no one did until GCC became more strict about things.
       
Pages:<< prev 1 next >>