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?
Maximum amount of act flags?
Posted by Syriac on Fri 22 Jan 2010 06:40 AM — 4 posts, 20,774 views.
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...
{
"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...
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.
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
that equates to 124 maximum fields for any extended bitvector
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