ok, I've been starring at this error message for better part of a day now.
I'm trying to make a simple eventlistner to run when someone touches a button. The problem is that hower ever I decided to name it it says it's nil and cannot be used.
I'm working on a scene
with the name "scene", self.view
named "sceneGroup". The rectangle I try to add a listner to is called "mMnew" and is in the group called "mMnewU".
I've tried to change the name between all of those. At first I hade problem with adding the eventlistener but solved it, problem was not the same sulution worked for the listners name.
Listner:
function scene.mMnewUeser:touch(event)
if(event.phase == "begun")then
local test1 = display.newRect(100,150,40,40)
test1:setFillColor(0,1,0)
print("Touch found")
end
end
Added listner:
scene:addEventListener("touch", scene.mMnewUeser)
I'm still pretty green with this language and used to code in JavaC, php, html, sql and AS3.0. Sorry for my rockie problems!
UPDATE:
After adding a few simple checkpoints check in the code, it would seam that it refuses to run the function scene:create(event)
my scene does hwoerver get created by local composer = require("composer")
local scene = composer.newScene()