setup.sbc
This file contains the project declaration and all global variables. The setup file has a different format than that of script files, and thus works differently.
Project Declaration
The project declaration contains the formal name of the Scrybe project, and optionally a file name. It is formatted like so:
project <project name> [as <filename>];
Examples:
project "My Project" as "myproject.sb3";
project "Jetpack Game";
In the second example, the filename would be Jetpack Game.sb3
. Any characters present in the project name are removed when using it as a filename if they are invalid Windows directory name characters.
Global Variables
By convention, global variables have all uppercase names, but this is not enforced by Scrybe. Global variables can be strings, numbers, lists, or even entire expressions. Here are some examples of valid global variable declarations:
HUNDRED: num = 100;
THREE = 3;
TWO_THIRDS: num = 2 / THREE;
MESSAGE: str = "Hello, World!";
THRESHOLD: bool = 5 > THREE;
FIBONACCI[] = [1, 1, 2, 3, 5, 8, 13, 21];
Hence their name, global variables are available (in scope) to each script inside of a project.