Assert

ASSERT(<bool> Condition, <string> Message)

 

This function allows the user to check certain conditions during execution of the script.  If the condition fails, execution is paused and a message box appears containing “Assert Failed: Message”.  The Message parameter is not required.

If the user would like to always pop up a message at any point in the script, the assert function can be used with Condition set to “false”.

Examples:

var test = 5;

 

ASSERT(test > 6, “Test is not greater than 6”); //this will fail (pop up message)

 

ASSERT(test == 5, “Test does not equal 5”); //this will pass (not pop up message)

 

ASSERT(false, “Alert”);    //this will fail (pop up message)