I was making a script using a short variable called doOnce, and the CS said there was an error. So I changed all instances of it in the script to another short variable that was working; corpsecount. It still caused an error.
EDIT: Nevermind. I just needed to remove the CCScriptActivatorRef.'s from the code because it was an object script.