You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have checked the Issues/Discussions pages to see if my issue has already been reported
I have properly titled my issue
Platform
Compiled from GitHub Source Code
Browser
None
Version
0.5.3
Description (include any images, videos, errors, or crash logs)
like the title says, hscript seems to kinda "forget" variables exist sometimes... and seemingly at random
its really annoying having to deal with this whenever it comes up and im completely stumped as to why this could be happening
sometimes what causes hscript to drop it is being a function parameter after the function ends like in #4158
publicfunctionexample1(callback:()->Void, obj:Dynamic):Void {
newFlxTimer().start(1, function():Void {
callback(); // errors saying it cant find "callback"trace(Std.string(obj)); // will also error saying it cant find "obj"
});
}
publicfunctionexample2(callback:()->Void, obj:Dynamic):Void {
varcallback_persist:()->Void=callback;
varobj_persist:Dynamic=obj;
newFlxTimer().start(1, function():Void {
callback_persist(); // works perfectly fine??????trace(Std.string(obj_persist)); // also works finecallback(); // still errors like in example1trace(Std.string(obj)); // still errors like in example1
});
}
or immediately after the variable is used in a trace inside a threaded Future made by a function thats called by a Timer. but only sometimes. what??????
Steps to Reproduce
unknown steps to reliably reproduce excluding #4158
hopefully more scenarios are found
The text was updated successfully, but these errors were encountered:
Issue Checklist
Platform
Compiled from GitHub Source Code
Browser
None
Version
0.5.3
Description (include any images, videos, errors, or crash logs)
like the title says, hscript seems to kinda "forget" variables exist sometimes... and seemingly at random
its really annoying having to deal with this whenever it comes up and im completely stumped as to why this could be happening
sometimes what causes hscript to drop it is being a function parameter after the function ends like in #4158
or immediately after the variable is used in a
trace
inside a threadedFuture
made by a function thats called by aTimer
. but only sometimes. what??????Steps to Reproduce
unknown steps to reliably reproduce excluding #4158
hopefully more scenarios are found
The text was updated successfully, but these errors were encountered: