Descriptive Problem Summary:
Using string addition operations in defines no longer works properly.
Numbered Steps to Reproduce Problem:
See below.
Code Snippet (if applicable) to Reproduce Problem:
#define SERVER_PATH_FORMAT "data/server/"
#define SOAPSTONE_FILE_FORMAT SERVER_PATH_FORMAT + "soapstone.json"
Expected Results:
SOAPSTONE_FILE_FORMAT would be "data/server/soapstone.json"
Actual Results:
SOAPSTONE_FILE_FORMAT is "soapstone.json"
Does the problem occur:
Every time? Or how often? Every time.
In other games? Yes.
In other user accounts? Unknown.
On other computers? Unknown.
When does the problem NOT occur?
Unknown, seems to always occur.
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Yes, it did not occur on the last version of 513 beta, before the switch.
Workarounds:
Writing your defines like
#define SERVER_PATH_FORMAT "data/server/"
#define SOAPSTONE_FILE_FORMAT "[SERVER_PATH_FORMAT]soapstone.json"
#define CKEY_PATH_FORMAT "data/users/%CKEY/"
#define CHARACTER_PATH_FORMAT "[CKEY_PATH_FORMAT]characters/"
#define CHARACTER_FILE_FORMAT "character_%CID.json"
#define CONNECTION_PATH_FORMAT "[CKEY_PATH_FORMAT]connections/"
#define CONNECTION_FILE_FORMAT "%DATE_%TIME.json"
Works fine.
FYI you should always surround the define with parentheses as best practice.