You've assumed heard_a is full of mobs (I believe it is).
But you've got a runtime operator : there when you've already typecasted it as /mob
show_message is defined at the /mob level

You're also assuming that you have show_message defined, but then immediately after checking if you have show_message defined.

If things like these aren't fixed as you go along it just causes absolute grief for somebody else later on.