natiny_script_create

C
NatinyScript natiny_script_create(void);

Creates a script state and returns the handle naming it. The state starts with no standard library and no engine modules: what it may reach is what the program opens into it next.

Returns

Type Description
NatinyScript The new state, or 0 when the interpreter could not be created

Example

C
NatinyScript script = natiny_script_create();
if (!script) return 1;

natiny_script_open_std(script);
natiny_script_open_render(script);
natiny_script_open_window(script);