-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Bug Report: script variable references are sometimes dropped early #4158
Labels
status: bug reproduced
Involves a bug which can be reliably reproduced by reviewers.
topic: mods
Related to the creation or use of mods.
type: minor bug
Involves a minor bug or issue.
Comments
Encountered a similar (if not, the same) issue when working on Play Video Event: // I was tired when making this.
switch (isCutscene) {
case 2:
shittyBool = true;
iSwearToGodIWillLiterallyStrangleFNFTheFilePathIsLiterallyRightThereYouCanFindItStopLying = filePath;
fuckingHell = mute;
FlxTween.tween(PlayState.instance.camHUD, {alpha: 0}, duration, {
ease: FlxEase.quadOut,
onComplete: function(twn:FlxTween) {
vidEvent.cameras = [PlayState.instance.camCutscene];
PlayState.instance.camHUD.visible = false;
vidEvent.play(iSwearToGodIWillLiterallyStrangleFNFTheFilePathIsLiterallyRightThereYouCanFindItStopLying);
vidEvent.bitmap.mute = fuckingHell;
recentTime = Conductor.instance.songPosition;
}
});
case 3:
vidEvent.cameras = [PlayState.instance.camCutscene];
PlayState.instance.camHUD.visible = false;
vidEvent.play(filePath);
vidEvent.bitmap.mute = mute;
recentTime = Conductor.instance.songPosition;
default:
vidEvent.cameras = [PlayState.instance.camHUD];
vidEvent.play(filePath);
vidEvent.bitmap.mute = mute;
recentTime = Conductor.instance.songPosition;
} |
3 tasks
This issue is a duplicate. Please direct all discussion to the original issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
status: bug reproduced
Involves a bug which can be reliably reproduced by reviewers.
topic: mods
Related to the creation or use of mods.
type: minor bug
Involves a minor bug or issue.
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 references 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
so far ive encountered:
1.
after a script function ends, references to the parameters are just... dropped
the value stays if you assign it to something else, but referencing the parameter it originated from will always error if the function has already ended
2.
happens immediately after the variable is used in a
trace
inside a threadedFuture
made by a function thats called by aTimer
. but only sometimes. what??????ill try to investigate more later and hopefully find more concrete reproducible examples
Steps to Reproduce
the only easily reproducible example i could get was the script function parameter one, but otherwise the behavior is really unpredictable... i couldnt even get the second example to reliably error or not error all the time
The text was updated successfully, but these errors were encountered: