Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
The problem with the hook callback is you cannot name the function starting with "on". No idea why but I had the same problem. Rename the "onHitMonster" function to something like "hitMonsterFN". I bet it fixes the problem.