Hello everyone,
I’m trying to create a polygon for a game I’m working on. THe basic idea is the get a ball into this goal: http://dl.dropbox.com/u/11226349/goal.png
However, Corona blacks out the screen on the simulator and returns the error message:
\main.lua:50: ‘}’ expected near ‘shape’
The code I wrote is as follows:
local goal = display.newImage("goal.png")
goal.x = 130; goal.y = 420; goalShape = { -24,-29, 24,-29, 24,29, -24,29, -24,21, 16,21, 16,-29, -24,-29, }
physics.addBody( goal, "static", { density = 1.0, friction = 0.3, bounce = 0.2 shape=goalShape } )
The lines correspond to lines 48, 49, and 50 of my program.
I’m not sure what I’m doing wrong. The polygon has 8 vertexes, and I’ve tried removing the space between the shape=goalShape code & } symbol, but I get the same error. Can anyone help me troubleshoot? [import]uid: 100403 topic_id: 20903 reply_id: 320903[/import]