Skip to content

Commit

Permalink
opps done fixed the actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tposejank committed Sep 30, 2024
1 parent e039c60 commit 15b2116
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/psychlua/HScript.hx
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ class HScript extends SScript
}
}

public function executeCode(?funcToRun:String = null, ?funcArgs:Array<Dynamic> = null): #if (SScript < "17.1.618") TeaCall #else Tea #end {
public function executeCode(?funcToRun:String = null, ?funcArgs:Array<Dynamic> = null): #if (SScript == "17.1.618") Tea #else TeaCall #end {
if (funcToRun == null) return null;

if(!exists(funcToRun)) {
Expand Down Expand Up @@ -346,7 +346,7 @@ class HScript extends SScript
return callValue;
}

public function executeFunction(funcToRun:String = null, funcArgs:Array<Dynamic>): #if (SScript < "17.1.618") TeaCall #else Tea #end {
public function executeFunction(funcToRun:String = null, funcArgs:Array<Dynamic>): #if (SScript == "17.1.618") Tea #else TeaCall #end {
if (funcToRun == null) return null;
return call(funcToRun, funcArgs);
}
Expand All @@ -356,7 +356,7 @@ class HScript extends SScript
funk.addLocalCallback("runHaxeCode", function(codeToRun:String, ?varsToBring:Any = null, ?funcToRun:String = null, ?funcArgs:Array<Dynamic> = null):Dynamic {
#if SScript
initHaxeModuleCode(funk, codeToRun, varsToBring);
final retVal: #if (SScript < "17.1.618") TeaCall #else Tea #end = funk.hscript.executeCode(funcToRun, funcArgs);
final retVal : #if (SScript == "17.1.618") Tea #else TeaCall #end = funk.hscript.executeCode(funcToRun, funcArgs);
if (retVal != null) {
if(retVal.succeeded)
return (retVal.returnValue == null || LuaUtils.isOfTypes(retVal.returnValue, [Bool, Int, Float, String, Array])) ? retVal.returnValue : null;
Expand Down

0 comments on commit 15b2116

Please sign in to comment.