BSL:Tutorial/Scratch: Difference between revisions

→‎Part 1 : Knowing your formats: moving C-Style page here too
(→‎Part 1 : Knowing your formats: moving Shell-Style page here; no point in being separate)
(→‎Part 1 : Knowing your formats: moving C-Style page here too)
Line 43: Line 43:
This is compiled much like the popular coding style C. The syntax can be placed into multiple-function lines and functions are divided by a ''';''' . In advanced scripts, this style will allow you to condense your script and the parts will be easier to read/debug. It also allows you to utilize some of the more advanced features easily. The problem with this is, that starting off, it is harder to write if you have had no previous experience with coding.
This is compiled much like the popular coding style C. The syntax can be placed into multiple-function lines and functions are divided by a ''';''' . In advanced scripts, this style will allow you to condense your script and the parts will be easier to read/debug. It also allows you to utilize some of the more advanced features easily. The problem with this is, that starting off, it is harder to write if you have had no previous experience with coding.


Example: [[C-Style]]
Example:
func void AddNeutralTeam(void) {
AddPlayer(Neutral, lobby_victim, "[o.Citizen Snips]"); sleep 150;
AddPlayer(Neutral, a_v4, "[y.Citizen Jones]"); sleep 150;
AddPlayer(Neutral, a_v1, "[b.Citizen Jane]"); sleep 150;
dmsg("[r.SHINATAMA'S] team complete");
}


Hybrid Style:
'''Hybrid Style''':
This is a combination between C-Style and Shell-Stlye. It keeps the easy-to-read format of Shell-Style, yet allows you to use the more advanced techniques of C-Style.
This is a combination between C-Style and Shell-Stlye. It keeps the easy-to-read format of Shell-Style, yet allows you to use the more advanced techniques of C-Style.