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

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Maximum amount of act flags?
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Maximum amount of act flags?

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


Posted by Syriac   (46 posts)  [Biography] 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?
[Go to top] top

Posted by Syriac   (46 posts)  [Biography] 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...
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] 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
[Go to top] top

Posted by Gohan_TheDragonball   USA  (183 posts)  [Biography] 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
[Go to top] 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.


4,036 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] 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]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]