ship = display.newImageRect( mainGroup, objectSheet, 4, 98, 79 )
ship.x = display.contentCenterX
ship.y = display.contentHeight - 100
physics.addBody( ship, { radius=30 } )-- line 73
ship.myName = “ship”
– Display lives and score
livesText = display.newText( uiGroup, "Lives: " … lives, 200, 80, native.systemFont, 36 )
scoreText = display.newText( uiGroup, "Score: " … score, 400, 80, native.systemFont, 36 )
local function updateText()
livesText.text = "Lives: " … lives
scoreText.text = "Score: " … score
end
–
local function createAsteroid()
local newAsteroid = display.newImageRect( mainGroup, objectSheet, 1, 102, 85 )
end
–
table.insert( asteroidsTable, newAsteroid )
physics.addBody( newAsteroid, “dynamic”, { radius=40, bounce=0.8 } ) --??? LINE 92
newAsteroid.myName = “asteroid”
I get this error: main.lua:92: ERROR: table expected. If this is a function call, you might have used ‘.’ instead of ‘:’.
I just started with corona and i got absolutely confused, because to me line 73 looks the same as 92, but i get an error on it, did everything by tutorial.
any help?