Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ Problem adding commands
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Rhayne
(14 posts) Bio
|
Date
| Sun 03 Jul 2011 05:44 PM (UTC) |
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,257 posts) Bio
|
Date
| Reply #1 on Sun 03 Jul 2011 08:05 PM (UTC) |
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,871 posts) Bio
|
Date
| Reply #2 on Sun 03 Jul 2011 08:22 PM (UTC) |
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) |
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,871 posts) Bio
|
Date
| Reply #4 on Mon 04 Jul 2011 08:46 PM (UTC) |
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) |
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.
21,091 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top