Global libary












Useage: call(Function func, Object params ...)
Returns: Bool
Description: Calls a function, and returns a bool if with true if it sucseeded. this call supresses the error call and thus is usefull for calling functions that might throw errors.
Code example: call(somefunc, 15)
Return value: True


Useage: environment()
Returns: String
Description: Returns a string stating what OS is running the code. (Linux/Windows)
Code example: environment()
Return value: "Windows"
Code example: environment()
Return value: "Linux"


Useage: error(String msg)
Returns: Null
Description: Throws an error.
Code example: error("Nyan~")
Return value: Null


Useage: include(String path)
Returns: Null
Description: Attempts to run code inside of the file refered to. The path is relative to the script that's being executed
Code example: include("")
Return value: Null


Useage: includeDll(String path)
Returns: Null
Description: Loads a dll refered to. The path is relative to the file that's being executed. Note: even trough this function ends with DLL, it will load .SO files on linux based systems. This is to make sure that BromScript code does not have to be edited for seperated configurations.
Code example: includeDll("magic.dll")
Return value: Null


Useage: print(String a, String b, String c, String ...)
Returns: Null
Description: Writes text to the default stdout. If more than 1 argument is given, a tab(\t) is added between arguments.
Code example: print("magic")
Return value: Null
Code example: print("more", "magic")
Return value: Null


Useage: setReadOnly(Object var)
Returns: Null
Description: Marks the variable as read only.
Code example: setReadOnly(somevar)
Return value: null
Notes: Warning, if you set this, this means that this CANNOT be changed and has a fixed value.
In case you do want to moddify it again, you need to do this through a c++ function by removing the variable from the
global/local scope, and then readd a new variable with the same name.
This will also throw errors in BS if you try to set variables in C++, this might mess up the callstack


Useage: sleep(Number miliseconds)
Returns: Null
Description: Sleeps current thread for the given miliseconds
Code example: sleep(1000)
Return value: Null


Useage: time()
Returns: Number
Description: Returns an unix timestamp including decimal for miliseconds
Code example: time()
Return value: 123456789.1234


Useage: tostring(Object toconvert)
Returns: String
Description: Converts any given variable to an string.
Code example: tostring(1337)
Return value: "1337"


Useage: typeof(Object var)
Returns: String
Description: Returns a string with the name of the given type. (String, Number, Table, Function, Class)
Code example: typeof(1337)
Return value: "Number"
Code example: typeof(sometable)
Return value: "Table"