sprite listeners

seem to be running into an issue where my code freaks out on a sprite listener, but works fine on one used earlier was wondering what that is.

this is the function that is breaking, and is is the shockDischarge listener that corona breaks on

ocal function updateShockStick() if(isLevelPlaying == true) then for i = 1, stickCount, 1 do if(shockStick[i].bDischarge == false) then shockStick[i]:addEventListener("sprite", dischargeStick) else --shockStick[i]:removeListener(dischargeStick) shockDischarge[i]:addEventListener("sprite", resetShockStick) end end end end [import]uid: 105311 topic_id: 22383 reply_id: 322383[/import]

watch your local, but im assuming that is a copy and paste error. Also, parenthesis are not required around the isLevelPlaying… Other than that it looks like you have the right amount of ends. [import]uid: 59735 topic_id: 22383 reply_id: 89243[/import]

I must be getting tired was a spelling issue with the actual function call [import]uid: 105311 topic_id: 22383 reply_id: 89244[/import]