Skip to content

Commit a2a12f1

Browse files
committed
quick fix 2
classes not using the correct line number.
1 parent 4295d42 commit a2a12f1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

source/funkin/backend/scripting/HScript.hx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,10 @@ class HScript extends Script {
7474
var code = Assets.getText(p);
7575
var expr:Expr = null;
7676
try {
77-
if (code != null && code.trim() != "")
77+
if (code != null && code.trim() != "") {
78+
parser.line = 1; // fun fact: this is all you need to reuse a parser without issues. all the other vars get reset on parse.
7879
expr = parser.parseString(code, cl.join("/") + "." + hxExt);
80+
}
7981
} catch(e:Error) {
8082
_errorHandler(e);
8183
} catch(e) {

0 commit comments

Comments
 (0)