Skip to content

Commit

Permalink
man
Browse files Browse the repository at this point in the history
  • Loading branch information
LarryFrosty committed Jan 31, 2025
1 parent 94b6caa commit 9a833e2
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions source/psychlua/HScript.hx
Original file line number Diff line number Diff line change
Expand Up @@ -368,14 +368,17 @@ class HScript extends Iris
public static function implement(funk:FunkinLua) {
funk.addLocalCallback("runHaxeCode", function(codeToRun:String, ?varsToBring:Any = null, ?funcToRun:String = null, ?funcArgs:Array<Dynamic> = null):Dynamic {
initHaxeModuleCode(funk, codeToRun, varsToBring);
final retVal:IrisCall = funk.hscript.executeFunction(funcToRun, funcArgs);
if (retVal != null)
{
return (retVal.returnValue == null || LuaUtils.isOfTypes(retVal.returnValue, [Bool, Int, Float, String, Array])) ? retVal.returnValue : null;
}
else if (funk.hscript.returnValue != null)
if (funk.hscript != null)
{
return funk.hscript.returnValue;
final retVal:IrisCall = funk.hscript.executeFunction(funcToRun, funcArgs);
if (retVal != null)
{
return (retVal.returnValue == null || LuaUtils.isOfTypes(retVal.returnValue, [Bool, Int, Float, String, Array])) ? retVal.returnValue : null;
}
else if (funk.hscript.returnValue != null)
{
return funk.hscript.returnValue;
}
}
return null;
});
Expand Down

0 comments on commit 9a833e2

Please sign in to comment.