Skip to content

Commit

Permalink
Fix Lua client.createinstance calling the wrong ApiHawk method
Browse files Browse the repository at this point in the history
fixes e6cb74d
  • Loading branch information
YoshiRulz committed Dec 22, 2020
1 parent 03b4ae1 commit 5a09805
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public LuaTable GetTool(string name)
[LuaMethod("createinstance", "returns a default instance of the given type of object if it exists (not case sensitive). Note: This will only work on objects which have a parameterless constructor. If no suitable type is found, or the type does not have a parameterless constructor, then nil is returned")]
public LuaTable CreateInstance(string name)
{
var instance = APIs.Tool.GetTool(name);
var instance = APIs.Tool.CreateInstance(name);
return instance == null ? null : _th.ObjectToTable(instance);
}

Expand Down

0 comments on commit 5a09805

Please sign in to comment.