Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement hscript-improved #13304

Closed
Prev Previous commit
Next Next commit
it returns void not null
  • Loading branch information
TheLeerName committed Sep 19, 2023
commit 36e3096038906ad10e366652d5800fd95c292aca
4 changes: 2 additions & 2 deletions source/psychlua/HScript.hx
Original file line number Diff line number Diff line change
Expand Up @@ -235,15 +235,15 @@ class HScript
// This function is unnecessary because import already exists in hscript-improved as a native feature
funk.addLocalCallback("addHaxeLibrary", function(libName:String, ?libPackage:String = '') {
initHaxeModule(funk);
if (!funk.hscript.active) return null;
if (!funk.hscript.active) return;

var str:String = '';
if(libPackage.length > 0)
str = libPackage + '.';
else if(libName == null)
libName = '';

var c = funk.hscript.resolveClassOrEnum(str + libName);
var c:Dynamic = funk.hscript.resolveClassOrEnum(str + libName);

try {
funk.hscript.setVar(libName, c);
Expand Down