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


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, 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.
 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ Maximum amount of act flags?

Maximum amount of act flags?

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


Posted by Syriac   (46 posts)  Bio
Date Fri 22 Jan 2010 06:40 AM (UTC)
Message
Is there a maximum number of act flags in SMAUG? I've got around 47 which all work fine but when I try to mstat them it always crashes and points to the build.c portion where they're all labeled. I don't understand why it keeps doing this. Is it too many characters to handle?
Top

Posted by Syriac   (46 posts)  Bio
Date Reply #1 on Fri 22 Jan 2010 06:46 AM (UTC)
Message
char * const act_flags [] =
{
"npc", "sentinel", "scavenger", "healer", "broker", "aggressive", "stayarea",
"wimpy", "pet", "train", "practice", "immortal", "deadly", "polyself",
"meta_aggr", "guardian", "running", "nowander", "mountable", "mounted",
"scholar", "secretive", "hardhat", "mobinvis", "noassist", "autonomous",
"pacifist", "noattack", "annoying", "statshield", "prototype", "banker",
"bounty", "bhunter", "nomobm", "randomok", "undertaker", "hardned",
"hotbooted", "tough", "randomed", "worthqp", "worthgp", "worthxp",
"invader"
};


I have 2 more act flags, but if I put even one more than this and try to mstat the mud crashes...
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #2 on Fri 22 Jan 2010 03:44 PM (UTC)
Message
You need to make sure that you keep the various constants in sync. You must have one name per flag value, and you must have the "max flags" value set correctly. If this is already true, you should run it in a debugger to see where it's failing.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Gohan_TheDragonball   USA  (183 posts)  Bio
Date Reply #3 on Wed 27 Jan 2010 04:16 PM (UTC)
Message
unless its been changed, there is no MAX_ACT_FLAG value

i threw in an additional string into mine without defining the value and my mud did not crash, so that means ur not inputting the new values correctly. and the limit of flags is defined in mud.h


/*
 * Defines for extended bitvectors
 */
#ifndef INTBITS
  #define INTBITS       32
#endif
#define XBM             31      /* extended bitmask   ( INTBITS - 1 )   */
#define RSV             5       /* right-shift value  ( sqrt(XBM+1) )   */
#define XBI             4       /* integers in an extended bitvector    */
#define MAX_BITS        XBI * INTBITS


that equates to 124 maximum fields for any extended bitvector
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.


15,163 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

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]