Misderection macro

So I used a macro to misdirect to my focus target for years. But it has recently been throwing up an error and I don’t know why.

#showtooltip arcane shot
/cast [@focus,raid][@pet,nodead][]misdirection
/script uierrorsframe:clear();
/cast arcane shot

is an example of my current macro set up. Any ideas on whats wrong with it or how to fix

Is your focus supposed to be in a raid? I have my focus set to friendly.

Here’s the one I use. Seems to work fine.

#showtooltip
/cast [@focus,help][help][@pet,exists] Misdirection

Didn’t notice the raid part. Not sure where that came from ty