I keep receiving the error "Reached illegal instruction ... at line X" and I go to the line and it's a simple code 'thisMenuSelected = 0'. I only receive this error when broadcasting to an android device. The full function is:
function awaitSelection()
thisMenuSelected = 0
for i=1 to pageDataArray[MENU_NUM,SLIDE_NUM].spriteIDs.length
id = pageDataArray[MENU_NUM,SLIDE_NUM].spriteIDs[i]
if GetSpriteHitTest(id,GetPointerX(),GetPointerY()) > 0
PlaySound(snd)
thisMenuSelected = i
exit
endif
next i
if thisMenuSelected = 0
if GetSpriteHitTest(arrowSpr, GetPointerX(), GetPointerY()) > 0 and SLIDE_NUM > 0
PlaySound(snd)
thisMenuSelected = arrowSpr
endif
if GetSpriteHitTest(homeSpr, GetPointerX(), GetPointerY()) > 0 and SLIDE_NUM > 0
PlaySound(snd)
thisMenuSelected = homeSpr
endif
endif
endfunction thisMenuSelected
This function has been working for a while and now it's not. :/