int FunctionExists(string funcname)
Returns 1 if the function named in the argument exists, 0 if it doesn't exist. However, it does so with the following caveats:
This function is extremely useful for errorchecking purposes when you're using CallFunction() in conjunction with datafile-defined strings, or any other time you're using CallFunction() and explicitly demand that a function exist.
//copy this all into a blank system.vc and run verge //if you don't understand what's going on. void Sully() { exit( "I am a clam. I have no beard. Isn't that weird?" ); } void Autoexec() { if( FunctionExists("Sully") ) { CallFunction( "Sully" ); } else { exit( "Sully() does not Exist!" ); } }
There are no talkbacks on this documentation page yet. Post the first?
Doc Nav |
Your docs |