Skip to content

Commit

Permalink
Update Hscript.hx
Browse files Browse the repository at this point in the history
  • Loading branch information
Joalor64GH authored Nov 13, 2024
1 parent 6d64486 commit be6ea45
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/modding/Hscript.hx
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ class Hscript extends FlxBasic {

setVariable('this', this);
setVariable('import', function(daClass:String, ?asDa:String) {
final splitClassName:Array<String> = [for (e in daClass.split('.')) e.trim()];
final className:String = splitClassName.join('.');
final daClass:Class<Dynamic> = Type.resolveClass(className);
final daEnum:Enum<Dynamic> = Type.resolveEnum(className);
var splitClassName:Array<String> = [for (e in daClass.split('.')) e.trim()];
var className:String = splitClassName.join('.');
var daClass:Class<Dynamic> = Type.resolveClass(className);
var daEnum:Enum<Dynamic> = Type.resolveEnum(className);

if (daClass == null && daEnum == null)
Lib.application.window.alert('Class / Enum at $className does not exist.', 'Hscript Error!');
Expand Down

0 comments on commit be6ea45

Please sign in to comment.