#define PERCENT(val) (round((val)*100, 0.1))
/client/New()
..()
var/list/popcount = list("escapees" = 5)
var/total_players = 10
src << PERCENT(popcount["escapees"]/total_players)
Should compile, instead:
code\sandbox.dm:9:error: ttotal_players: missing comma ',' or right-paren ')' code\sandbox.dm:9:error: ttotal_players: missing comma ',' or right-paren ')' code\sandbox.dm:9:error: ttotal_players: missing comma ',' or right-paren ')' code\sandbox.dm:9:error: ttotal_players: expected end of statement code\sandbox.dm:9:error: ): expected } code\sandbox.dm:4:error: location of top-most unmatched {
// .. same as above ..
src << PERCENT(popcount/total_players)
Should compile (though runtime), instead:
code\sandbox.dm:9:error: popcountttotal_players: undefined var code\sandbox.dm:6:warning: popcount: variable defined but not used code\sandbox.dm:7:warning: total_players: variable defined but not used
Does the problem occur:
Every time? Or how often? Every time.
In other games? Yes, in a test project.
In other user accounts? Unknown.
On other computers? Unknown.
When does the problem NOT occur?
When only a single identifier is used.
Adding whitespace around operators changes the exact error messages but does not resolve the failure.
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.)
New in 512.1443.
Workarounds:
None known.