Register forum user name Search FAQ

Gammon Forum

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 ➜ function look up & reverse function lookup - smaug 1.4 & FUSS

function look up & reverse function lookup - smaug 1.4 & FUSS

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Nargsbrood   (54 posts)  Bio
Date Wed 17 Oct 2007 03:47 AM (UTC)
Message
in smaug1.4 - TABLES.C file contained the function lookups and reverse function lookups for various functions like skill or command functions.

IE: (lookup)
if( !str_cmp( name, "do_mdelete" ) )
return do_mdelete;
if( !str_cmp( name, "do_memory" ) )
return do_memory;
if( !str_cmp( name, "do_mfind" ) )
return do_mfind;
if( !str_cmp( name, "do_minvoke" ) )
return do_minvoke;
if( !str_cmp( name, "do_mistwalk" ) )
return do_mistwalk;
if( !str_cmp( name, "do_mlist" ) )
return do_mlist;

and: (reverse lookup)

if( skill == do_mdelete )
return "do_mdelete";
if( skill == do_memory )
return "do_memory";
if( skill == do_mfind )
return "do_mfind";
if( skill == do_minvoke )
return "do_minvoke";
if( skill == do_mistwalk )
return "do_mistwalk";
if( skill == do_mlist )
return "do_mlist";



This section is not in the TABLES.C for FUSS 1.8

How is the lookup system handled? Is it dynamic?
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #1 on Wed 17 Oct 2007 03:54 AM (UTC)
Message
Yep, it's dynamic.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Nargsbrood   (54 posts)  Bio
Date Reply #2 on Wed 17 Oct 2007 03:58 AM (UTC)
Message
so just adding the functions and assigning them in the OLC of commands or spells works? just like that? nice nice :)
Top

Posted by Nargsbrood   (54 posts)  Bio
Date Reply #3 on Wed 17 Oct 2007 04:11 AM (UTC)
Message
i've added the function and now i add the command using:
cedit testing create do_map

and get this:

Log: Admin: cedit testing create do_map
Log: [*****] BUG: Error locating do_map in symbol table. Resource temporarily unavailable
Command added.
Code do_map not found. Set to no code.
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #4 on Wed 17 Oct 2007 04:16 AM (UTC)
Message
Quote:
Code do_map not found. Set to no code.

That's your problem there. Did you make sure to add do_map to mud.h?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Nargsbrood   (54 posts)  Bio
Date Reply #5 on Wed 17 Oct 2007 04:21 AM (UTC)
Message
yes I did add it but you reminded me, thankyou, that i did not make clean :) hmm
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.


19,162 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.