Help!

So wrote this code with the help of a video
local physics = require(“physics”)
physics.start()

system.actvate( “multitouch” )

physics.setDrawMode(“debug”)

display.setStatusBar( display.HiddenStatusBar )

physics.setGravity(0, 4.9)

local background = display.newImage(“nuclear_iphone_wallpapers.jpg”)

local can = display.newImage(“can.png”)
can.x = display.contentWidth/2
physics.addBody(can {bounce = 0.5, friction = 1.0})

local can2 = display.newImage(“can.png”)
can2.x = can.x - 105
physics.addBody(can2 {bounce = 0.5, friction = 1.0})

local can3 = display.newImage(“can.png”)
can3.x = can.x +105
physics.addBody(can3 {bounce = 0.6, friction = 1.0})

local leftWall = display.newRect(0, 0, 1, display.contentHeight )
local rightWall = display.newRect(display.contentWidth, 0, 1, display.contentHeight )
local ceiling = display.newrect(0, 0, display.contentWidth, 1 )

physics.addbody(leftWall, “static”, { bounce = 0.1} )
physics.addbody(rightWall, “static”, { bounce = 0.1} )
physics.addbody(ceiling, “static”, { bounce = 0.1} )

local floor = display.newImage(“floor.png”)
floor.y = display.contentHeight - floor.stageHeight/2
physics.addBody(floor, “static”, { bounce = 0.2, friction = 1.0})

function moveCan(event)
local can = event.target
can:applyLinearImpulse( 0, -0.2, event.x, event.y )
end
can:addEventListener(“touch”, moveCan)
can2:addEventListener(“touch”, moveCan)
can3:addEventListener(“touch”, moveCan)

After this it wouldnt run and i got these errors in the corona terminal
2011-01-18 18:31:03.185 Corona Simulator[646:903] Got error in FileWatch lastTimeModification

this keeps happening repeatedly then it stops

Can anyone please help?? [import]uid: 17040 topic_id: 5177 reply_id: 305177[/import]

i don’t know what the specific problem is here, that error sounds like issues in your filesystem but anyway…

do note that the “touch” event has 3 phases (“began”, “moved” and “ended” … well there’s also “cancelled” too)

really you probably only want to apply your moveCan during the “began” or “moved” phase? ie do you actually want to keep applying the force every time the event fires or just the once?

[lua]if(event.phase==“moved”)

end[/lua]
[import]uid: 6645 topic_id: 5177 reply_id: 17188[/import]

Thanks for the help but it still won’t run. What do you think could be the problem with the filesystem?? [import]uid: 17040 topic_id: 5177 reply_id: 17189[/import]

Or do you think it might be because I only have the trial version? [import]uid: 17040 topic_id: 5177 reply_id: 17353[/import]

Or do you think it might be because I only have the trial version? [import]uid: 17040 topic_id: 5177 reply_id: 17354[/import]

do you know how i could add a timer that stops when the can hits the ground and
how to keep score of how many times you tap the cans?? [import]uid: 17040 topic_id: 5177 reply_id: 19424[/import]