Login
User Name:

Password:



Register

Forgot your password?
SmaugFUSS 1.8/1.9
Sep 21, 2024 5:04 am
By Elwood
Bug: char_check( )
Aug 31, 2024 12:27 am
By GatewaySysop
Bug: move_char( )
Aug 30, 2024 3:52 am
By GatewaySysop
Bug: spell_animate_dead
Aug 25, 2024 10:48 pm
By GatewaySysop
ROOM_NO_MAGIC Inconsistencies...
Jul 8, 2024 12:32 am
By GatewaySysop
Discord Websocket Server
Author: Khonsu
Submitted by: Khonsu
Mapout Fix
Author: Khonsu
Submitted by: Khonsu
Progfind command
Author: Khonsu
Submitted by: Khonsu
do_owhere recursive
Author: Khonsu
Submitted by: Khonsu
Changes list / Addchange
Author: Khonsu
Submitted by: Khonsu
Users Online
CommonCrawl, AhrefsBot, Bing

Members: 0
Guests: 5
Stats
Files
Topics
Posts
Members
Newest Member
492
3,803
19,665
608
TerranceMa

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
Apprentice
GroupMembers
Posts57
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,690
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,921
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 >>