moonsharp-devs / moonsharp

An interpreter for the Lua language, written entirely in C# for the .NET, Mono, Xamarin and Unity3D platforms, including handy remote debugger facilities.
http://www.moonsharp.org
Other
1.41k stars 213 forks source link

ScriptRuntimeException thrown from Table.ResolveMultipleKeys has incorrectly formatted error message #308

Open ThisIsNoZaku opened 2 years ago

ThisIsNoZaku commented 2 years ago

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 point to a table");

As you can see, the messages have placeholders but are not formatted, showing messages like this : MoonSharp.Interpreter.ScriptRuntimeException : Key '{0}' did not point to anything