The 'path' variable is not defined.
The script should work if you add the following to the beginning:You can also remove two extra do-end pairs, but that's just for aesthetics.path = GetMapDataPath()
It displays the name of the hero who touched the object and the name of the object itself.
Another question: for some reason, the built-in script checker complains about the function (not defined) and the 'heroname' parameter (also not defined).
What could be undefined there?
I got a little confused with do-end: based on my experience with Pascal and C, I'm used to 'else' not being the beginning of a code block.