Comments are commonly used in scripts in order to add further information and structure.

In the Script Editor, comments are indicated in green.

There are two different ways to write comments:

def helloworld
  #prints "Hello World!"
  p "Hello World!"

If you write #, everything written in the same line but behind the sign will be considered as commentary. Therefore, this works as well:

p "Hello World!" #prints "Hello World!"

However, comments using # only work for a single line each.

If you want more lines to be considered as commentary, you'll have to use this method:

  this is a comment
  since this is between "begin" and "end",
  this is considered to be a comment, even though it's longer than one line.
  begin and end have to be at the very beginning of their
  lines, otherwise it will not work.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.