I suspect the "normal lua" version was slightly different. What you posted shouldn't work.
The issue is that upd is in the subtable at "player", not at any integer index.
P#136165 2023-10-21 12:24
2
You have a couple of things going on here. First, you are treating objs like a table that contains other tables, but to do that, you need to either wrap that player= block in its own set of braces, or remove the player= altogether. And if you wrap the player= block in braces, you'll have to change your loop to use objs[i].player.upd()
because the upd() function will be a member of player and not objs[i] directly.
P#136167 2023-10-21 12:36
[Please log in to post a comment]