Any embedded expression will make the compiler assume that a string is not constant, even if the expression is clearly constant.
Numbered Steps to Reproduce Problem:
Attempt to compile the code below.
Code Snippet (if applicable) to Reproduce Problem:
#define MYDEFINE 1
/datum/foo
var/bar = "[MYDEFINE]"
var/baz = "[1]"
Expected Results:
Things to compile.
Actual Results:
__DEFINES\a.dm:4:error: =: expected a constant expression
__DEFINES\a.dm:5:error: =: expected a constant expression
Does the problem occur:
Every time? Or how often?
Every time.
In other games?
n/a
In other user accounts?
n/a
On other computers?
n/a
When does the problem NOT occur?
When there are no expressions embedded in the string.
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.)
didn't test
Workarounds:
Type out the constants directly. This isn't great, but it works.