Reply to this subject
Start a new subject
 
Refresh page
| Posted by |
Rhayne
(14 posts) 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. | top |
|
| Posted by |
Twisol
USA (2,229 posts) bio
|
| Date |
Reply #1 on 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 | top |
|
| Posted by |
Zeno
USA (2,867 posts) bio
Moderator |
| Date |
Reply #2 on 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 | top |
|
| Posted by |
Rhayne
(14 posts) bio
|
| Date |
Reply #3 on 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.
| top |
|
| Posted by |
Zeno
USA (2,867 posts) bio
Moderator |
| Date |
Reply #4 on 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 | top |
|
| Posted by |
Nick Cash
USA (626 posts) bio
|
| Date |
Reply #5 on 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 | 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,422 views.
Reply to this subject
Start a new subject
 
Refresh page
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )