Bug - Fixed Error on to_item(string) for strange strings

ckb

Minion
Staff member
I have been working on a script that parses some text strings from the inventory page, and Mafia seems to have problems with some strings and the to_item() command. I would expect Mafia to return none for strings that are not items, and it does, but it also gives a debug error.

For instance, using build 9781 from the CLI: ash to_item("Misc. Inventory Functions")

gives:
Code:
Returned: none
plural => nones
descid =>
image =>
levelreq => 0
quality =>
adventures =>
muscle =>
mysticality =>
moxie =>
fullness => 0
inebriety => 0
spleen => 0
notes =>
combat => false
reusable => false
usable => false
multi => false
seller => none
Unexpected error, debug log printed.

ckb
 

Attachments

  • DEBUG_20110901.txt
    1.6 KB · Views: 30

ckb

Minion
Staff member
FYI - it also has an error for the strings "qua" and "lobster" and "bottle"

Maybe it is a function of returning multiple matches for terms that do not uniquely determine an item?
 

ckb

Minion
Staff member
Most trial and error leads me to believe that the to_item() function will indeed return this error for any string that does not uniquely determine an item.

even ash to_item("") will result in an error.

ckb
 
Top