This tag refers to the table type in Lua that implements associative arrays.

learn more… | top users | synonyms

-3
votes
1answer
44 views

Lua and complex numbers [closed]

I try to use complex numbers in a lua program. I need to parse a table of complex numbers printing side by side the name of the complex number and its value. Can't get through it : I don't ask how ...
7
votes
1answer
74 views

Lua/Love2D Resource Loader (Queue)

I made this resource queue in Love2D. ...
2
votes
0answers
82 views

Project Euler #14 in Clojure (finding long Collatz sequence chain)

I'm working on a Clojure implementation for Project Euler #14, which asks for the initial element, under 106, that produces the longest collatz-sequence chain. I'm trying to make use of every ...
5
votes
1answer
71 views

Return table value based on a primitive “priority queue”

I have 2 function in Lua, one to look if a key is present inside a provided table and if true then return the value, else return false. This lookup function is called by another function with a "...
4
votes
1answer
54 views

Form for choosing settings

I've created a form to choose the settings: These settings are automatically saved in a file from the game client in this form: ...
4
votes
1answer
282 views

Default value mechanism in Lua using metatables

I am writing a couple of functions accepting tables as input parameters. These tables constitute a range of options, which should either be given or inferred from default tables. Concrete use cases ...
6
votes
1answer
152 views

String split and tables

I have a table structured like this: ...
4
votes
1answer
387 views

Return one particular element first, when iterating a lua table

I wish to iterate through a Lua table, but want to get one particular element first always (its key is known beforehand). Since the pairs function does not guarantee the order of a table's elements, ...
6
votes
1answer
58 views

Converting the integers to their equivalent string representations

I have the following function which converts an integer (such as 103) to its string representation ("one hundred three"): ...