Difference between revisions of "Scripting Tutorial: My Second Script"

m
imported>8asrun6aer
m (formatting fix)
imported>8asrun6aer
 
Line 73: Line 73:


===Code Comments===
===Code Comments===
Comments can be placed anywhere in-code with the semicolon character - '''';'''' - Whatever you type ''after'' the semicolon on the same line will be ignored when the script compiles.  If you want more than one line of comment, you must have one semicolon for each line.
Comments can be placed anywhere in-code with the semicolon character - ''';''' - Whatever you type ''after'' the semicolon on the same line will be ignored when the script compiles.  If you want more than one line of comment, you must have one semicolon for each line.


You use comments inside your scripts to generally explain what you are trying to accomplish in your code, which can help you and others understand what's going on inside the script quickly at a later date.  Comments can also serve as a debugging technique by commenting out lines of code one-by-one to pinpoint the source of some odd or unintended effect in-game.   
You use comments inside your scripts to generally explain what you are trying to accomplish in your code, which can help you and others understand what's going on inside the script quickly at a later date.  Comments can also serve as a debugging technique by commenting out lines of code one-by-one to pinpoint the source of some odd or unintended effect in-game.   
Anonymous user