What is precisely your error? This is a bit vague. If you show your code it would be easier to solve.
Besides that you can use almost all functions in events, just dont use stuff like ent_create and effect(), unless you put wait() before that, it creates memory errors I think.