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
➜ ROM
➜ Compiling the server
➜ New flags
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Scalar
(2 posts) Bio
|
Date
| Tue 10 Nov 2015 01:19 AM (UTC) |
Message
| 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! | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Tue 10 Nov 2015 03:01 AM (UTC) |
Message
| 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. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | 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.
11,017 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top