lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I guess it is the implementation detail array part vs. hash part.
With the first write access to the table that can't be in the array part, Lua creates the hash part and stores anything following there.

Try adding

      game_field[0] ="green"

before

initialize_game_field()

and call your script with argument 1...

--
Oliver

Am 23.11.20 um 15:52 schrieb Egor Skriptunoff:
Or is it an inherent Lua feature every Lua programmer should be aware of?