Login
User Name:

Password:



Register
Forgot your password?
LOP Building Guide v1.0
Author: Hanaisse
Submitted by: Hanaisse
Reset Guide
Author: Hanaisse
Submitted by: Hanaisse
LOP 1.38r2
Author: Remcon
Submitted by: Remcon
LOP 1.37
Author: Remcon
Submitted by: Remcon
LOP 1.36
Author: Remcon
Submitted by: Remcon
Yahoo! Slurp, Quixadhal, Baiduspider, MSN Search

Members: 1
Guests: 3
Stats
Files
Topics
Posts
Members
Newest Member
369
3,185
15,632
526
Craty####
» 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 bottom of the page Go to the top of the page
Solao
Fledgling
GroupMembers
Posts4
JoinedNov 20, 2009
AIM Yahoo MSN GT

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 ? .........................
Solao Bajiuik
       
Post is unread #2 Nov 20, 2009, 7:03 am
Go to the bottom of the page Go to the top of the page


Caius
Magician
GroupMembers
Posts100
JoinedJan 29, 2006
WWW


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). .........................
SWR2 Refactor - The improved SWR 2.0 codebase.
       
Post is unread #3 Nov 20, 2009, 7:06 am   Last edited Nov 20, 2009, 7:08 am by Caius
Go to the bottom of the page Go to the top of the page


Caius
Magician
GroupMembers
Posts100
JoinedJan 29, 2006
WWW

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. .........................
SWR2 Refactor - The improved SWR 2.0 codebase.
       
Post is unread #4 Nov 20, 2009, 7:08 am
Go to the bottom of the page Go to the top of the page
Solao
Fledgling
GroupMembers
Posts4
JoinedNov 20, 2009
AIM Yahoo MSN GT

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. .........................
Solao Bajiuik
       
Post is unread #5 Nov 20, 2009, 7:10 am   Last edited Nov 20, 2009, 7:19 am by Solao
Go to the bottom of the page Go to the top of the page
Solao
Fledgling
GroupMembers
Posts4
JoinedNov 20, 2009
AIM Yahoo MSN GT

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 .........................
Solao Bajiuik
       
Post is unread #6 Nov 20, 2009, 7:39 am
Go to the bottom of the page Go to the top of the page
Solao
Fledgling
GroupMembers
Posts4
JoinedNov 20, 2009
AIM Yahoo MSN GT

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
Code:
void do_setbuilding( CHAR_DATA * ch, char *argument )


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


Caius
Magician
GroupMembers
Posts100
JoinedJan 29, 2006
WWW

Glad to see you got it sorted out ;) .........................
SWR2 Refactor - The improved SWR 2.0 codebase.
       
Post is unread #8 Nov 20, 2009, 8:16 pm
Go to the bottom of the page Go to the top of the page
Keirath
Apprentice
GroupMembers
Posts73
JoinedJan 24, 2008

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