source:
function f1(...)
for i,v in pairs(arg[1]) do
print(i, v)
end
end
f1({["sound1"] = "sound1.mp3",
["sound2"] = "sound2.mp3",
["sound3"] = "sound3.mp3",})
result:
main.lua is uploading.
Uploading finished.
sound2 sound2.mp3
sound1 sound1.mp3
sound3 sound3.mp3
why the second was the first?
Comments
http://www.nightspade.com
However if you are insistant about using alphanumeric arrays and want them to be ordered as Sound1 ,Sound2 and Sound3, then the way for that would be
hope that helps you in some ways
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps