moonsharp icon indicating copy to clipboard operation
moonsharp copied to clipboard

An interpreter for the Lua language, written entirely in C# for the .NET, Mono, Xamarin and Unity3D platforms, including handy remote debugger facilities.

Results 123 moonsharp issues
Sort by recently updated
recently updated
newest added

lua script: (edit: simplified lua script) ``` if true then for x = 1, 10 do goto label1 end ::label1:: end print("test") ``` stacktrace (from REPL): ``` Unhandled Exception: System.NullReferenceException:...

These are lines 137-141 in Table.ResolveMultipleKeys: ``` if (vt == null) throw new ScriptRuntimeException("Key '{0}' did not point to anything"); if (vt.Type != DataType.Table) throw new ScriptRuntimeException("Key '{0}' did not...

In Processor_InstructionLoop.cs, if the CLR function wrapped by a CallbackFunction returns null, that null is pushed on the value stack and the processor proceeds on to call Internal_CheckForTailRequests. In Internal_CheckForTailRequests,...

C# supports an object initializer syntax on construction like so: var myObj = new MyClass() {someOptionalProperty="value"}; Likewise Lua standard 16.1 supports this on its native values via OO syntactic sugar:...

`ExtensionType` has cache issue? ```cs public static class ExtMethods { public static void Test1(this MyClass c) { Debug.Log("test1"); } public static void Test2(this MyClass c) { Debug.Log("test2"); } public static...

MoonSharp already has an extension for executing scripts asynchronously. However, that extension allows pretty much no control over the script's execution. Currently, the only way to do so is through...

enhancement
help wanted
feature

Now Unity has an API to implement scripted asset importer. That makes it possible to import `.lua` file as `TextAsset`, rather than use `.txt` file, which may lead to miss...

Hi, Ran into an issue where creating new coroutines is allocating 2 megs of garbage, when a new Processor() is created - easy to see by attaching the Unity CPU...

Pressing CTRL-Z on the interpreter causes the following: `Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. at MoonSharp.Program.InterpreterLoop(ReplInterpreter interpreter, ShellContext shellContext) in Z:\git\my\moonsharp\src\MoonSharp\Program.cs:line 68 at...

To send a Tuple to Lua, simply pass it as a global. ie: script.Globals["a_tuple"] = Tuple.Create(1, 2, 3); You can then unpack it in Lua normally: local a, b, c...

feature