zarqon
Well-known member
Presently, $item[Staff of Ed] and to_item("Staff of Ed") returns the second of the two Staves of Ed without mentioning that it could have just as well returned the first staff. And similarly for the two ancient amulets.
I would like to request that mafia display a "friendly warning" in cases where the supplied constant name has multiple matches. For example, a script that contains $item[ancient amulet] should print something like
And a script that uses to_item("Staff of Ed") should print something like:
Ideally, these warnings would also fire for loading data files, since that's another case where text is matched up to mafia's constants.
I would like to request that mafia display a "friendly warning" in cases where the supplied constant name has multiple matches. For example, a script that contains $item[ancient amulet] should print something like
Multiple matches for "ancient amulet" (somescript.ash, line 123). Clarify by using one of:
$item[2180]
$item[7963]
And a script that uses to_item("Staff of Ed") should print something like:
Multiple matches for "Staff of Ed" (somescript.ash, line 123). Clarify by using one of:
"[2325]Staff of Ed"
"[7961]Staff of Ed"
Ideally, these warnings would also fire for loading data files, since that's another case where text is matched up to mafia's constants.