I wonder how I can use this kind approach without an error:
Example:
local sfx={one} sfx.one = audio.loadSound( "sfx/mp3\_music/mysound.mp3") sfx.one.name="soundfx"
The last line with the .name is generating this error:
attempt to index field ‘one’ (a userdata value)
How can I add some info to my soundfiles, so I can later check in an if clause what file is getting called? I need some kind of ID for each sound (like the name) to check in my module what sound was called.
How can I do this?