Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
parse description bug
Dec 15, 2017, 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, Yahoo!, Google, DotBot

Members: 0
Guests: 10
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 » SWR FUSS » Slight Bug with Dynamic Comma...
Forum Rules | Mark all | Recent Posts

Slight Bug with Dynamic Commands SWR13Fuss
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Nov 20, 2009, 6:55 am
Go to the top of the page
Go to the bottom of the page

Solao
Fledgling
GroupMembers
Posts4
JoinedNov 20, 2009

It seems that the Dynamic Command support isn't functioning for me. I have modified the Dynamic commands since I downloaded it. However, I added a .c and .h and linked them in and it compiles perfectly. However, the commands found within building.c are unable to be created. Does anyone have any idea what might be causing this ?
       
Post is unread #2 Nov 20, 2009, 7:03 am
Go to the top of the page
Go to the bottom of the page

Caius
Magician
GroupMembers
Posts132
JoinedJan 29, 2006


Solao said:

It seems that the Dynamic Command support isn't functioning for me. I have modified the Dynamic commands since I downloaded it. However, I added a .c and .h and linked them in and it compiles perfectly. However, the commands found within building.c are unable to be created. Does anyone have any idea what might be causing this ?

Perhaps you forgot to declare them in mud.h. As far as I can remember this is required in C++ (which SWRFUSS compiles as).
       
Post is unread #3 Nov 20, 2009, 7:06 am   Last edited Nov 20, 2009, 7:08 am by Caius
Go to the top of the page
Go to the bottom of the page

Caius
Magician
GroupMembers
Posts132
JoinedJan 29, 2006

Come to think of it, it IS required to delcare them in mud.h with DECLARE_DO_FUN. This is because of the C++ name mangling. dlsym won't find the function unless it is declared with extern "C", which DECLARE_DO_FUN does.
       
Post is unread #4 Nov 20, 2009, 7:08 am
Go to the top of the page
Go to the bottom of the page

Solao
Fledgling
GroupMembers
Posts4
JoinedNov 20, 2009

Nope Caius.. I have them declared in mud.h. Originally, I like to keep larger functions seperate with their own .c and .h's but i changed this after it had issues the first time to put the DECLARE_DO_FUN's into mud.h vs building.h. Just doesn't seem to like me :P I've added into my old mud (Galactic Rising) the dynamic command smaug snippet sooo long ago. But I've been out of the game for a few years and just coming back.
       
Post is unread #5 Nov 20, 2009, 7:10 am   Last edited Nov 20, 2009, 7:19 am by Solao
Go to the top of the page
Go to the bottom of the page

Solao
Fledgling
GroupMembers
Posts4
JoinedNov 20, 2009

Its a rather confusing thing. Everything appears to be in all the correct places it just doesn't want to link the commands in building.c
       
Post is unread #6 Nov 20, 2009, 7:39 am
Go to the top of the page
Go to the bottom of the page

Solao
Fledgling
GroupMembers
Posts4
JoinedNov 20, 2009

Seems it was a problem with the way I made the commands.. I used the oldschool gcc 2.x.x method whereas i needed to have const char*

Old
void do_setbuilding( CHAR_DATA * ch, char *argument )


New
void do_setbuilding( CHAR_DATA * ch, const char *argument )
       
Post is unread #7 Nov 20, 2009, 8:12 am
Go to the top of the page
Go to the bottom of the page

Caius
Magician
GroupMembers
Posts132
JoinedJan 29, 2006

Glad to see you got it sorted out ;)
       
Post is unread #8 Nov 20, 2009, 8:16 pm
Go to the top of the page
Go to the bottom of the page

Keirath
Magician
GroupMembers
Posts144
JoinedJan 24, 2008

Ah, don't let him take the credit! It'll go to his head.
       
Pages:<< prev 1 next >>