Login
User Name:

Password:



Register

Forgot your password?
6Dragons mp3 sound pack
Author: Vladaar
Submitted by: Vladaar
AFKMud 2.2.3
Author: AFKMud Team
Submitted by: Samson
SWFOTEFUSS 1.5
Author: Various
Submitted by: Samson
SWRFUSS 1.4
Author: Various
Submitted by: Samson
SmaugFUSS 1.9.4
Author: Various
Submitted by: Samson
Users Online
CommonCrawl, DotBot, AhrefsBot

Members: 0
Guests: 1
Stats
Files
Topics
Posts
Members
Newest Member
487
3,779
19,587
583
Hokai

Today's Birthdays
There are no member birthdays today.
» SmaugMuds » Codebases » SmaugFUSS » Am I missing something with d...
Forum Rules | Mark all | Recent Posts

Am I missing something with dynamic command support?
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Feb 10, 2023 8:12 pm   Last edited Feb 10, 2023 8:12 pm by Tindalos
Go to the top of the page
Go to the bottom of the page

Tindalos
Fledgling
GroupMembers
Posts3
JoinedFeb 10, 2023

 
Hey everyone. I've recently been playing with the SmaugFUSS code and I seem to be having an issue with the dynamic command support. I am familiar with using it as I've used it in SWR before and implemented it myself following a snippet.

The issue I'm having is no matter what code I add, it simply doesn't register as code for a new command.

ie. Created code for command do_rfill, void do_rfill( CHAR_DATA *ch)

Compile, hotboot

cedit rfill create

It basically tells me the code doesn't exist.

Am I missing something?

Post is unread #2 Feb 10, 2023 8:36 pm   
Go to the top of the page
Go to the bottom of the page

Vladaar
Fledgling
GroupMembers
Posts49
JoinedNov 24, 2016

 
cedit refill create do_refill

That's how I have to make commands anyway.

Or do cedit refill code do_refill

Maybe don't have to do that with dynamic stuff.

Vladaar

Post is unread #3 Feb 10, 2023 9:29 pm   
Go to the top of the page
Go to the bottom of the page

Tindalos
Fledgling
GroupMembers
Posts3
JoinedFeb 10, 2023

 
With my experience with dynamic command support, just typing "cedit rfill create" would be sufficient. With the DNS caching system in SMAUG, the cache command wasn't created but typing "cedit cache create" works perfectly.

It just seems like anything included on stock SmaugFUSS works fine but it's having an issue with anything that is new. I should also mention I've tried adding a few new commands all with the same result.

Post is unread #4 Feb 11, 2023 12:54 pm   
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,680
JoinedJan 1, 2002

 
All functions that use the DECLARE_DO_FUN setup need to have both the *ch parameter and the const char* argument parameter.

So
void do_rfill( CHAR_DATA *ch)
is not going to work. You need
void do_rfill( CHAR_DATA *ch, const char* argument )


Even if the function never does anything with argument.

Post is unread #5 Feb 11, 2023 2:25 pm   
Go to the top of the page
Go to the bottom of the page

Tindalos
Fledgling
GroupMembers
Posts3
JoinedFeb 10, 2023

 
Thank you very much Samson. I'm assuming the const char* part is due to the code being compiled with g++?

In all my hobby experience with MUDs, I've always used C as opposed to C++ so I'm guessing this is where my confusion came from. Thanks again, its very much apprecaited.

Post is unread #6 Feb 15, 2023 2:53 pm   
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,909
JoinedJul 26, 2005

 
lol i remember before that got added how annoying it was to add new commands. it really does save lots of time and as samson pointed out it is needed because it looks for those to build its list of possible commands.

Pages:<< prev 1 next >>