Am I missing something with dynamic command support?
< Newer Topic
:: Older Topic >
Pages:<< prev 1 next >>
#1 Feb 10, 2023 8:12 pm
Last edited Feb 10, 2023 8:12 pm by 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?
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?
#2 Feb 10, 2023 8:36 pm
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
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
#3 Feb 10, 2023 9:29 pm
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.
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.
#4 Feb 11, 2023 12:54 pm
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
Even if the function never does anything with argument.
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.
#5 Feb 11, 2023 2:25 pm
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.
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.
#6 Feb 15, 2023 2:53 pm
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 >>