zarqon
Well-known member
A problem has arisen due to our new friendly warnings. There are 30 items, 34 monsters, 3 locations, and a whopping 50 effects with commas in their names. Now try to specify any of these correctly in a plural typed constant.
Without commas: $effects[ooh sweet!, ooh salty!, ooh bitter!]
Changing "ooh sweet!" to "Ooh, Sweet!" would get rid of this message (zlib.ash)
Changing "ooh salty!" to "Ooh, Salty!" would get rid of this message (zlib.ash)
Changing "ooh bitter!" to "Ooh, Bitter!" would get rid of this message (zlib.ash)
With commas: $effects[ooh, sweet!, ooh, salty!, ooh, bitter!]
Changing "ooh" to "Ooh, Bitter!" would get rid of this message (zlib.ash)
Changing "sweet!" to "Ooh, Sweet!" would get rid of this message (zlib.ash)
Changing "ooh" to "Ooh, Bitter!" would get rid of this message (zlib.ash)
Changing "salty!" to "Ooh, Salty!" would get rid of this message (zlib.ash)
Changing "ooh" to "Ooh, Bitter!" would get rid of this message (zlib.ash)
Changing "bitter!" to "Ooh, Bitter!" would get rid of this message (zlib.ash)
(Odd that "ooh" matches "Ooh, Bitter!" despite 5 matching effects, innit? I was expecting a "multiple matches" error, but either way, that's still an undesirable result.)
The next logical thing to try is quotes around the names: ash $effects["ooh, sweet!", "ooh, salty!", "ooh, bitter!"]
Bad effect value: ""ooh" (zlib.ash)
Veracity has suggested the following to fix this issue:
She also suggested this very Feature Request, so I am hereby marking that part of her post Implemented.
Without commas: $effects[ooh sweet!, ooh salty!, ooh bitter!]
Changing "ooh sweet!" to "Ooh, Sweet!" would get rid of this message (zlib.ash)
Changing "ooh salty!" to "Ooh, Salty!" would get rid of this message (zlib.ash)
Changing "ooh bitter!" to "Ooh, Bitter!" would get rid of this message (zlib.ash)
With commas: $effects[ooh, sweet!, ooh, salty!, ooh, bitter!]
Changing "ooh" to "Ooh, Bitter!" would get rid of this message (zlib.ash)
Changing "sweet!" to "Ooh, Sweet!" would get rid of this message (zlib.ash)
Changing "ooh" to "Ooh, Bitter!" would get rid of this message (zlib.ash)
Changing "salty!" to "Ooh, Salty!" would get rid of this message (zlib.ash)
Changing "ooh" to "Ooh, Bitter!" would get rid of this message (zlib.ash)
Changing "bitter!" to "Ooh, Bitter!" would get rid of this message (zlib.ash)
(Odd that "ooh" matches "Ooh, Bitter!" despite 5 matching effects, innit? I was expecting a "multiple matches" error, but either way, that's still an undesirable result.)
The next logical thing to try is quotes around the names: ash $effects["ooh, sweet!", "ooh, salty!", "ooh, bitter!"]
Bad effect value: ""ooh" (zlib.ash)
Veracity has suggested the following to fix this issue:
I would suggest the following:
- change the parsing of the comma-separated list of objects in a plural constant to allow "" around an object name: $items[ "staff of ed, almost", ...]
- change the "this warning would go away" message for plural constants to put "" around the recommended object name if it contains a comma.
- optionally, delimit object names in the "friendly warning" with single quotes. So:
Changing 'almost' to '"Staff of Ed, almost"' would get rid of this message ()
She also suggested this very Feature Request, so I am hereby marking that part of her post Implemented.
Last edited by a moderator: