Fork me on GitHub

Documentation for the Maniaplanet game operating system

File

Settings

Constants

Variables

Functions

Control structures

Control structures are: if, else if, else, switch, while, foreach, for.

Example, file LibFoo.Script.txt

#Const C_ConstantVariable 456

declare Integer G_GlobalVariable;

Void Private_DoNothing() {
}

Text DoSomething(Integer _Id) {
    declare Text Result;
    if (_Id == 42) {
        Private_DoNothing();
        Result = "42";
    } else {
        Result = "";
    }

    foreach (Player in Players) {
        declare Text LibFoo_VariableForSomehting for Player;
        VariableForSomehting = "42";

        declare netwrite Integer Net_LibFoo_Variable for Player;
        Net_LibFoo_Variable = 42;
    }

    return Result;
}