Skip to content
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

E2 Events unable to remember variables set outside of them #2496

Closed
unknao opened this issue Nov 27, 2022 · 3 comments
Closed

E2 Events unable to remember variables set outside of them #2496

unknao opened this issue Nov 27, 2022 · 3 comments
Labels

Comments

@unknao
Copy link
Contributor

unknao commented Nov 27, 2022

The new E2 Events seem to forget variables set outside of them as if they aren't persisted.

image
This example only prints 1 once and then proceeds to only print 0 afterwards.

@Vurv78
Copy link
Contributor

Vurv78 commented Nov 27, 2022

Yes, you still need to persist them. They don't have upvalues / aren't lambda functions. This same behavior would happen with functions.

I had this conversation on the discord with divran, I could just disable the code that makes non-@persist variables be reset anyways, and this would work as if it did have upvalues, but that would mess with code relying on them to reset.

Oh I completely ignored @outputs, weird. Let me look into it rq

@unknao
Copy link
Contributor Author

unknao commented Nov 27, 2022

When i was testing it it didn't make any difference if it was using @outputs or @persist for the variable.

@Vurv78
Copy link
Contributor

Vurv78 commented Nov 27, 2022

Yes, It should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants