New flags

Posted by Scalar on Tue 10 Nov 2015 01:19 AM — 2 posts, 14,297 views.

#0
Hi! I'm new to this forum and had a quick question. I'm trying to add some new flags EG: ACT type mob flags, EXTRA type item flags and some AFFECT type flags.

I've added them to merc.h, an example would be rage

#define AFF_RAGE (a)

Then in tables.c

{ "rage", a, TRUE },

Then in handler.c, under affect_bit_name

if ( vector & AFF_RAGE ) strcat( buf, " rage" );

It might sound stupid, but where else should I put it?
I tried compiling and got an error:

handler.c: In function ‘affect_bit_name’:
handler.c:4101: error: ‘a’ undeclared (first use in this function)
handler.c:4101: error: (Each undeclared identifier is reported only once

Any help would be appreciated!
Australia Forum Administrator #1
Those flags are defined earlier up in the file, ie.


/* RT ASCII conversions -- used so we can have letters in this file */

#define A                       1
#define B                       2
#define C                       4
#define D                       8
#define E                       16
#define F                       32
#define G                       64
#define H                       128

#define I                       256
#define J                       512
#define K                       1024
#define L                       2048
#define M                       4096
#define N                       8192
#define O                       16384
#define P                       32768

#define Q                       65536
#define R                       131072
#define S                       262144
#define T                       524288
#define U                       1048576
#define V                       2097152
#define W                       4194304
#define X                       8388608

#define Y                       16777216
#define Z                       33554432
#define aa                      67108864        /* doubled due to conflicts */
#define bb                      134217728
#define cc                      268435456    
#define dd                      536870912
#define ee                      1073741824



There is no lower-case "a" there.