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
When adding a reassignment (smth like let str = "test"; str = "test 2"), the variable card gives me a syntax error (for example in display panels). Reinserting the variable card solves the issue (it's still annoying regardless).
Steps to reproduce the problem:
Add a variable to your script, for example let str = "Hi InDy"
Use this variable in a variable card and insert it into a connected display panel
The variable's value is displayed properly
Reassign the variable in your script, like str += " and InScripting!"
Display Panel shows an X, hovering over the X in display panel's GUI shows that it's a SyntaxError (depends on what type of variable you are reassigning)
The script variable probably got updated while you were typing, at which point the line was not complete yet and would result in a syntax error.
So I don't think the re-assignment itself is the problem.
Not sure yet what a good solution to this could be...
Activity
rubensworks commentedon Feb 7, 2024
Thanks for reporting!
rubensworks commentedon Feb 7, 2024
Could you share the syntax error message you're getting?
QinomeD commentedon Feb 7, 2024
Sure, one sec!
QinomeD commentedon Feb 7, 2024
This is for the number type, for some reason syntax error says there's no
arsymbol, but I usearr, so idkQinomeD commentedon Feb 7, 2024
This happens for reassigning array values
rubensworks commentedon Feb 7, 2024
The script variable probably got updated while you were typing, at which point the line was not complete yet and would result in a syntax error.
So I don't think the re-assignment itself is the problem.
Not sure yet what a good solution to this could be...
QinomeD commentedon Feb 7, 2024
oh yeah, it's actually not only reassigning, I just didn't really test anything, since just changing the value manually didn't trigger the error
maybe the variable should be updated when the player stops writing?
rubensworks commentedon Feb 7, 2024
Note to self: consider invalidating errored variables, but only those that errored due to the currently edited script.
[-]Syntax error on reassigning a variable in script[/-][+]Syntax error in variables while editing script[/+]Allow listening to EvaluationException resolutions
Automatically invalidate network errors on script changes