You are missing three punctuation marks.
-tgt = $IndexOf($CharacterContext());
You don't say what hook contains this script but Manikus
seemed to think it was "StartCombatRound". If not,
ignore the rest of this post.
And, although that might fix your syntax, I suspect
the semantics might be a bit wrong, too. It looks as
if you mean the result of that statement to be some sort
of 'target' (you called it tgt). But, at the start of combat,
there is no 'target'. There is only the combatant entering
the next combat round. Perhaps that is simply a misleading
variable name. There is no rule against obfuscation.