I have a script where I want to control what channels are played.
see: http://developer.anscamobile.com/forum/2012/03/23/audio-questions-what-channel
But in trying to implement this I get a runtime error I don’t understand.
Here’s a simplified script to just show what I’m trying to do:
audio.reserveChannels( 1 )
Sound1 = audio.loadSound( "HB\_sound\_clip1.mp3" )
function playSound()
audio.play( Sound1 {channel = 1} )
end
playSound()
The error:
Runtime error: … attempt to call global ‘Sound1’ (a userdata value)
If I take out {channel = 1} it works OK.
Making Sound1 a local variable doesn’t help. I still get a “userdata” error. What does this error mean? Is there any documentation on Corona SDK error messages?
Thanks
Eric
[import]uid: 128346 topic_id: 23847 reply_id: 323847[/import]
[import]uid: 52491 topic_id: 23847 reply_id: 96047[/import]