Comments (Scripting): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Mindraker No edit summary |
>Mindraker No edit summary |
(No difference)
|
Revision as of 00:13, 18 October 2008
Introduction
This tutorial covers how to include comments in your script(s).
Single-line comments
A comment starts anywhere with a double hyphen (--) and runs until the end of the line:
Example: -- This is an example of a comment
Comments do not appear in the output window. They are mostly to help the programmer understand what a section of code is for in long, complicated scripts.
Block comments
Lua also offers block comments, which start with --and run until the corresponding . A block comment can go over more than one line:
Example: --[[ This is an example of a block comment. --]]
Notice how this comment is on more than one line. In the first example, it is limited to one line.