FraggleScript Syntax Rules
Note: This deals with the syntax rules of Fragglescript exclusively. For information on how to junction scripts with levels, see Basic Script Implementation.


As it is with any programming language, FraggleScript has its own syntactic rules that coders need to follow, otherwise they'll hear the dreaded player death sound as their script starts to run.

Not unlike C, C++, or Pascal, functions in FraggleScript (from this point on, called FS) need to end with a semicolon.



rnd();
tip("Word up!");
playername();


Unlike other programming languages, however, FS seperates lists and series by commas instead of semicolons.



for(i=0, i<10, i++);
int i, j, k;


Got it? Hopefully you do. To set off where scripts start and end, use brackets.



script 0
{
tip("Hi everybody!");
wait(100);
tip("Hi Doctor Nick!");
}


Want everyone to see your sharp wit when they look at your code? Well, that's the joy of comments. Comments can be set off by lines beginning with ;, or anything preceding in a line after //.



script 0
;This is script 0
{
tip("Hi, everybody!");
wait(100); // Wait 100 tics
tip("Hi, Doctor Nick!"); // This is a quote from the Simpsons
}
;That was Script 0