General > Developers Corner

Giving Table Values

<< < (2/2)

MrPresident:
my method would have worked. It shouldn't return a table value.

v in the case of a k,v pairs loop would return the value inside the table.. which in the case of the example provided would be a string.

MrPresident:
Example console output:

lua_run local testtab = { "test1", "test2" } for k, v in pairs( testtab ) do print(v) end
       
test1
test2

Navigation

[0] Message Index

[*] Previous page

Go to full version