#EDIT: I clicked on the icon on the side.. Didn't know it was c-script. Maybe this will help you anyways..
Use goto to skip to the end of a function:
(Lite-C)
function something()
{
//some instructions
if(needtoquit)goto somethingend;
//more instructions
somethingend:
wait(1);
}
There are better methods, but i can't get them out of the top of my head..