|
The arrays problem in ENIGMA is that variables of type var, when accessed using [], must be encoded using (), because otherwise 2-D access using commas is not supported. Basically, [snip=edl]my_var[1,2][/snip] goes in, [snip=cpp]my_var(1,2)[/snip] comes out. ENIGMA's current type coercion is woefully inadequate, and as a consequence, this ends up happening for all arrays. So only var arrays work. A quick band-aid on this is to only make that replacement when a comma is detected outside of parentheses inside the brackets.
The lua_table implementation is fine. All it does is keep a dense portion and a sparse portion of an array of whatever object type you give it. It's pretty inefficient for one-dimensional access... I should do something about it.
|