Verifying Script Functionality
Symptoms
A script fails to execute if there are syntax errors or runtime issues, such as missing variables or incorrect logic.
It can also fail if the script is not properly triggered (e.g., a failure in a preceding action like a trigger or DTMF input), the script may notrun as expected.
Detailed description
Please detail the symptoms
Log(book) output
Please enter log or cocos logbook output when available.
Cause
Issues with a script are likely caused by one or more of the following:
- Not running: The action that triggers the script to run may not be setup correctly, or may have an issue.
-
Syntax Errors: The script might contain invalid syntax (like missing punctuation) or incorrect code structure. These errors can usually be detected by the system.
-
Runtime Errors: Even if there’s no obvious syntax error, the script could fail during execution due to logical errors or missing data.
Solution / How To
1. Check if the script was executed
| Navigate to the "Programming / Scripts" section (or "System / Scripts" in versions before 5.1.0) | ![]() |
|
Here you should see that the script was executed.
Confirm that the script has been executed. If not, refer to the appropriate article based on how the script is triggered:
|
2. Check the script for (syntax) errors
| Open the script where you suspect the issue. Look for common issues like missing semicolons, undefined variables, or incorrect values. |
![]() |
| Scroll down to "Info / errors / warnings" to check for errors. | ![]() |
3. Review the Logbook
4. Fix Any Errors Found
|
If you see any syntax issues, such as a missing semicolon or an undefined variable, fix them.
In the first example case we changed |
|
|
|
|
5.Test the Script (Again)
|
After any fixes have been made, we should test the script to see if any issues still occur.
Click the "Execute script now" button to preform a test. |
|
|
If a source and/or value are required for the script, fill these with the data the script might expect.
Like in the example a call from a tag, where the source is the tag name, and value the tag value. |
|
|
Click the "Execute script now" button to execute the script. |
|
|
After this you can follow step 2 - 4 until there are no more issues. |
|
1. Check the script
|
Navigate to "Programming / Scripts" (or "System / Scripts" in versions before 5.1.0)
You may already be able to see that there is an error from this list, like in this case. |
|
| Open the script where you suspect the issue. | |
|
Scroll down to "Info / errors / warnings" to see if there are any (syntax) errors for the script.
In this example case we can see that there was a syntax error with the line
|
2. Check the script logs
|
Since some scripts may not have any syntax or other errors under the "Info / errors / warnings" header but still don't work, we should also check the log book for any logs created by the script.
Navigate to the "logbook" tab. |
|
|
Check the logbook for this script, for any issues.
In this example case the script has informed us that our |
References
For more in-depth troubleshooting and information on how to manage scripts, refer to the following resources:
- PHP Syntax - Detailed information on (PHP) scripting syntax.









