graphics.newOutline() Crashes simulator!

Ok so im trying to use graphics.newOutline() but when i use it; it crashes the simulator! Here is the code im using…

Its in a main.lua brand new project…

I have 8GB RAM with 4th gen intel core i5 predecessor which runs the toughest of games!

Heres the code.

local physics = require("physics") physics.start() physics.setDrawMode( "hybrid" ) local world = display.newImageRect( "imgs/world.png", 160, 219 ) world.x = display.contentCenterX world.y = display.contentCenterY + 50 local worldOutline = graphics.newOutline( 2, world ) physics.addBody( world, "static", { outline = worldOutline } ) 

Gives me this error… and crashes…

ERROR: bad argument #2 to graphics.newOutline(): filename or image sheet expected, but got table. 

Thanks!

I believe it happens because the second parameter for newOutline has to be the image filename (a string) instead of a display object.

I have tried multiple ways… All same error… Can anyone write the correct way of doing this?

Thanks!

I believe it happens because the second parameter for newOutline has to be the image filename (a string) instead of a display object.

I have tried multiple ways… All same error… Can anyone write the correct way of doing this?

Thanks!