Hi,
It seems like I didn’t really got how and in what order I should put function and other declarations.
When I try a function like this
local function SayHI()
if Object.alpha == 1 then
print (“ciao”)
end
end
called when a “tap” event takes place.
if I put it before creating an object=display.newImage
it gives me an error : attempt to index upvalue ‘Object’ (nil Value)
if I put it at the end of file, after I declared both the object and the listener, it just doesn’t fire.
If I put it between the declared listeren AND the declaration to create the new object, everything works.
I’m doing something wrong, or in Lua the order is really important? It makes thing more complicated for me this way :\ [import]uid: 8486 topic_id: 1913 reply_id: 301913[/import]