I would recommend NOT doing tostring() on the hash.
It does work on the dev build but will not work on the release build as it doesnt keep the string dict for the hashes.
Pass hashes or numbers as keys for a table you got stored somewhere.
JCash : Your examples were most helpful. As a Lua newbie, it had not occurred to me that the docs were referring to Lua library functions.
Could you suggest any good resources for learning the Lua libraries?
Contrary to my assumptions, hash() and mathv.xx are not part of the Lua libraries, but in fact extensions to it.
The reason for using hashes is also made clear here.