Well, for one thing, you're using the comparison operator (==) in a couple of places where you want the assignment operator (=).
Edit: However, that won't cause compilation errors. Such a statement will simply evaluate as true or nil, but will have no effect on the rest of the code. It's no different than writing this line:
Code:
1;
Looking through your code, I don't immediately spot any syntax errors. What you've posted should compile.
However, as pointed out earlier in this thread, that final else block will never be reached, because the two previous tests take care of all of the possible cases. [[ It looks to me as if you're trying to use that final block to create an Unglow action. If so, you need to start by figuring out what command the player will use to stop glowing, and then implement that separately.]]
Edit: No, I see it now. You need a separate test to determine if the player is currently glowing. You're trying to test powerlevel again, and that won't tell you what you need to know.
I would also point out that you don't need to use modify to create the code for execAction(). You can put that within the definition of DefineIAction(Glow), before the semicolon.