Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 478 Bytes

README.md

File metadata and controls

16 lines (11 loc) · 478 Bytes

Preagonal.Scripting.GS2Compiler

C# GS2 compiler package for Preagonal scripting projects.

using Preagonal.Scripting.GS2Compiler;

CompilerResponse response = Interface.CompileCode("function onCreated() { echo(\"hi\"); }");

if (response.Success)
{
	byte[] bytecode = response.ByteCode;
}

The public API is centered on Interface.CompileCode(string? code, string? type = "weapon", string? name = "npc", bool withHeader = true) and returns CompilerResponse.