Logo

๐Ÿ’ฌ Comments

Comments let you add notes or explanations to your ZeroTrace scripts. They make your scripts much easier to understand for you and for others because comments are always ignored when your script runs.


โœ๏ธ How to Write Comments

ZeroTrace supports comments almost anywhere, just like in popular programming languages!

1. Use # or // for Comments

  • You can add # or // anywhere on a line at the start or after a command.
  • Everything after # or // is ignored by the interpreter.
# This is a full line comment

writeLn "Hello" // This is an inline comment

delay "1000" # Another inline comment

blabla // this is just a random note

// This whole line is a comment

2. Freestyle Notes

  • Any line that doesn't match a command is treated as a comment and ignored.
  • You can write plain English notes as long as you donโ€™t start with a command word.
This is a freestyle note that will be ignored by the script runner.
Anything that doesnโ€™t look like a command is safe to use as a comment.

Warning: If your freestyle note starts with a command (like writeLn, delay, etc.), it will be executed!


โœ… Good Examples

# This script prints a message
writeLn "Hello, World!" // Inline comment

// Wait before next command
delay "1000"

This is a freestyle note about what happens next

_$VAR isAdmin = "true" // Variable assignment with comment

โŒ Bad Example

writeLn "Test" This looks like a command and may cause errors

This is incorrect because the text after writeLn "Test" is not marked as a comment (missing # or //). Always use # or // for inline comments after commands.


Tip: For best results and easy reading, use # or // for all your comments. Inline comments are fully supported put them after any command, anywhere on the line!

On this page