Simple lua script failing (set servo chanel at arm)

I have simple script to change servo output to camera to start recording, but script fails to start…

function update()
local armed = arming:is_armed()
if armed then
SRV_Channels:set_output_pwm(94, 2000)
SRV_Channels:set_output_pwm(94, 1001)
return update, 2000

return update()

Any idea why?

Look early in the messages tab for the full error when it first happend.