Logo

๐Ÿ’ฌ Comments

Comments in ZeroTrace scripts let you add notes or explanations to your code without affecting how it runs. Use comments to make your scripts clearer for yourself and others!

โœ๏ธ Comment Syntax Rules

You can write comments in several ways:

  1. Official Comments
    Use # or // at the start of a line Use '//' for inline comments
# This is a comment
// This is also a comment
writeLn "Hello" // This is an inline comment
delay "1000" # Another inline comment
  1. Freestyle Comments You can write anything on a new line, as long as it doesn't get detected as a command. For example:
This is just a note and will be ignored by the interpreter

If your comment looks like a command (e.g., starts with known keywords like writeLn, delay, etc.), it will be executed. So, avoid using command-like phrases for freestyle comments!

โœ… Valid Usage

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

// Wait before next command
delay "1000"

This is a freestyle comment explaining what happens next
_$VAR isAdmin = "true"

โŒ Invalid Usage

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

Use comments to make your scripts easier to understand. Official comments (# or //) are recommended for clarity. Freestyle comments work tooโ€”just donโ€™t make them look like commands!

On this page