[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Problem adding commands

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Problem adding commands
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please)
Maximum of 6000 characters. Text only please, no HTML.
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by Nick Cash   USA  (626 posts)  [Biography] bio
Date Tue 05 Jul 2011 11:08 PM (UTC)  quote  ]
Message
As Zeno said, once you have installed the code and recompiled (make), you need to use cedit to add the command in the game. Otherwise you'll always get 'Huh?' because the game won't know to call the code.

~Nick Cash
http://www.nick-cash.com
[Go to top] top

Posted by Zeno   USA  (2,867 posts)  [Biography] bio   Moderator
Date Mon 04 Jul 2011 08:46 PM (UTC)  quote  ]
Message
Just follow how the existing commands are set up. One new line in mud.h, make clean, use cedit to create etc.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Rhayne   (14 posts)  [Biography] bio
Date Mon 04 Jul 2011 04:25 PM (UTC)  quote  ]
Message
Zeno said:

SmaugFUSS doesn't have tables stuff anymore it's all dynamic.



Ah, that makes sense. Any clue how to implement the delete code then? I get everything put in with no compile errors and it always returns Huh? I downloaded the fuss 1.6 codebase yesterday and it installed and worked no problem. I'd rather use 1.9 for obvious reasons though if I could get it working.
[Go to top] top

Posted by Zeno   USA  (2,867 posts)  [Biography] bio   Moderator
Date Sun 03 Jul 2011 08:22 PM (UTC)  quote  ]
Message
SmaugFUSS doesn't have tables stuff anymore it's all dynamic.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Twisol   USA  (2,229 posts)  [Biography] bio
Date Sun 03 Jul 2011 08:05 PM (UTC)  quote  ]
Message
I have no experience with SMAUG, but 'delete' is a reserved word in C++. You might want to make sure you're compiling it as C, not C++.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Rhayne   (14 posts)  [Biography] bio
Date Sun 03 Jul 2011 05:44 PM (UTC)  quote  ]
Message
It's probably needless to say, but I'm completely new to coding. I'm trying to add a few snippets to the SmaugFUSS 1.9 codebase, such as Samson's delete code and running into some problems. In tables.c, I'm not quite sure where to add the statements. In previous searches I've seen instructions for adding it in the case by lines such as:

if ( !str_cmp( name, "do_cast" )) return do_cast;

but I'm not seeing anything like that in my tables.c. I tried adding:

KEY( "Delete", skill->delete, fread_string_nohash( fp ) );

but get the compile error:

tables.c:1125:6: error: expected unqualified-id before ‘delete’
tables.c:1125:6: error: expected ‘)’ before ‘delete’

Thanks in advance for any advice.
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


1,421 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]