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

Fix Lua assert error when adding values to tables (e.g. in event arguments) #318

Conversation

lionkor
Copy link
Member

@lionkor lionkor commented May 10, 2024

When adding elements to a table, the .add() function does not behave as expected in various cases, making it really shit and difficult to use. Instead, we keep our own index and just add one by one. It works, and it's easy to understand.

This may lead to indices which are nil, i.e. non-fully-sequential tables, but I can't be asked to worry about it because that shouldn't be an issue when we use .set() everywhere.

When adding elements to a table, the .add() function does not behave as
expected in various cases, making it really shit and difficult to use.
Instead, we keep our own index and just add one by one. It works, and
it's easy to understand.

This may lead to indices which are nil, i.e. non-fully-sequential
tables, but I can't be asked to worry about it because that shouldn't be
an issue when we use .set() everywhere.
@lionkor lionkor linked an issue May 10, 2024 that may be closed by this pull request
@lionkor lionkor merged commit c9d926f into minor May 11, 2024
9 checks passed
@lionkor lionkor deleted the 317-in-v340-calling-an-event-will-create-an-sol2-assertion-failure branch May 11, 2024 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In v3.4.0, calling an event will create an SOL2 assertion failure
2 participants