Anyone have any idea what type of error this may be?

The debugger and simulator are showing no sign at all of the error, but when i build it on a device i get this error:

/Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/composer/composer.lua:1451:ERROR:table expected. If this is a function call, you might have used ‘.’ instead of ‘:’

I understand what the error is saying but I don’t get where its coming from? I don’t have anything in the files thats even close to what its telling me, and also have no idea why i can’t reproduce the error on the simulator/debugger. I’m also sure it’s not just the device I’m trying it on, because I’ve tried it on 3 diffrent devices with the same error on all 3. Any help on this issue would be greatly apreciated!

A. You may  have a syntax error in your scene file:

Debug Trick

A trick to debug this is to load the file via require (temporarily).  This will always uncover file-level-visible syntax errors.

--composer.gotoScene( "results" ) -- Fails for some reason with a weird error. require( "results" ) -- Does not load screen, but may help you find the syntax -- error(s) in the scene file.

Once you find and resolve the syntax errors, go back to using the gotoScene() function.

– AND / OR –

B. You are not calling a function right.

local obj = display.newCircle( 10, 10, 10 ) -- RIGHT local obj = display:newCircle( 10, 10, 10 ) -- WRONG

or some other case vice versa from above where dot ‘.’ is wrong and colon ‘:’  is right.

-- RIGHT local obj = display.newCircle( 10, 10, 10 ) obj:removeSelf() -- WRONG local obj = display.newCircle( 10, 10, 10 ) obj.removeSelf() -- DOT NOTATION IS WRONG HERE

Ahh thanks man! I figured out I accidently had a function that I forgot to make local, and my physics.start wasn’t inside of my scene create. Its wroking perfect now thanks!

By far the most common reason I get the “you might have used ‘.’ instead of ‘:’” error is because I have given an invalid group name as the first arg in a display.newImageRect call.

e.g.

local myImage = display.newImage(myMadeUpGroup, "theimage.png", 128, 128)

where myMadeUpGroup does not exist.

Just thought I’d mention it for people who have the same error in future.

A. You may  have a syntax error in your scene file:

Debug Trick

A trick to debug this is to load the file via require (temporarily).  This will always uncover file-level-visible syntax errors.

--composer.gotoScene( "results" ) -- Fails for some reason with a weird error. require( "results" ) -- Does not load screen, but may help you find the syntax -- error(s) in the scene file.

Once you find and resolve the syntax errors, go back to using the gotoScene() function.

– AND / OR –

B. You are not calling a function right.

local obj = display.newCircle( 10, 10, 10 ) -- RIGHT local obj = display:newCircle( 10, 10, 10 ) -- WRONG

or some other case vice versa from above where dot ‘.’ is wrong and colon ‘:’  is right.

-- RIGHT local obj = display.newCircle( 10, 10, 10 ) obj:removeSelf() -- WRONG local obj = display.newCircle( 10, 10, 10 ) obj.removeSelf() -- DOT NOTATION IS WRONG HERE

Ahh thanks man! I figured out I accidently had a function that I forgot to make local, and my physics.start wasn’t inside of my scene create. Its wroking perfect now thanks!

By far the most common reason I get the “you might have used ‘.’ instead of ‘:’” error is because I have given an invalid group name as the first arg in a display.newImageRect call.

e.g.

local myImage = display.newImage(myMadeUpGroup, "theimage.png", 128, 128)

where myMadeUpGroup does not exist.

Just thought I’d mention it for people who have the same error in future.