Terminating a Script in init();

 

I'm sorry that i have to bother you but i didn't find anything through search.

Script connects to db in init() function ... if it can't connect the script should be stopped/terminated and do NOTHING more.

How can i achieve that?

thanks for your advices!

 
bool abort;
int init(){
   bool connected = ...
   if (!connected){ abort = true; Alert(...
}
int start(){
   if (abort) return;
   :
 
thank you, thats a nice work around!
Reason: