The scripting command removeAllActions is defined on the wiki as a unary operator with a lhs operand, which is not possible.
Syntax: unit removeAllActions
The in-game script help however, shows it as: unit removeAllActions index
Since the command removes all actions for the unit, the index operand seems to be a dummy operand.
The syntax should be: removeAllActions unit
like all the other removeAll* commands.