i have this problem:
ERROR:SCRIPT: game/container.script:6: bad argument #7 to ‘animate’ (number expected, got function)
stack traceback:
[C] in function animate
game/container.script:6: in function <game/container.script:3>
this is the code:
local data = require('main.data')
function init(self)
data.state = data.STATE_GAME
go.set_position(vmath.vector3(0, -data.max_y, 0))
go.animate('.', go.PLAYBACK_LOOP_FORWARD, 0, go.EASING_OUTQUINT, 0.4, 0, function()
msg.post('circle', 'start')
timer.delay(2, false, function()
msg.post('square', 'start')
end)
end)
end
function on_message(self, message_id, message, sender)
if message_id == hash('end_game') then
timer.delay(0.3, false, function()
go.animate('.', 'position.y', go.PLAYBACK_LOOP_FORWARD, data.max_y, go.EASING_INQUINT, 0.4, 0, function()
msg.post('main:/go', 'show_gameover')
end)
end)
end
end