castspell is a protected function, you can't call it like that and expect it to work in a macro anymore. those days are long gone.