Trying to get a value from an array of audio tracks. I cant use the index from AudioplayerEvent because it always starts at O even if you decide to start playing from track 3 so I’ve put an index value in the array, an integer, to identify the track so the screen can be accurate.
Num:“0”
When i try to access the value i get the debugger error “non-numeric array index not allowed” code excerpted below, which i dont understand, can someone explain?
thanks
item=[
{
Url: "http://www.xxx.com/roku/songs/song.mp3",
....other parameters
Num:"0"
},
{
.....other tracks
}]
if type (msg) = "roAudioPlayerEvent"
if msg.isListItemSelected()
m.song = msg.GetIndex()
end if
if msg.isStatusMessage() then
if msg.getmessage() = "start of play"
m.song = item["Num"]
scr.SetContent(item[m.song])
end if
end if
231: End Function
Attempt to use a non-numeric array index not allowed. (runtime error &he8) in ...c/pkg:/source/audioscreen.brs(219)
219: m.song = item["Num"]
