193 }); |
194 }); |
194 |
195 |
195 if action_timeout and action_timeout > 0 then |
196 if action_timeout and action_timeout > 0 then |
196 local action_number = i; |
197 local action_number = i; |
197 verse.add_task(action_timeout, function () |
198 verse.add_task(action_timeout, function () |
198 if i == action_number then |
199 if i == action_number and not script.finished then |
199 local e = new_error("action-timeout", { text = "Timeout waiting for response" }); |
200 local e = new_error("action-timeout", { text = "Timeout waiting for response" }); |
200 error(e); |
201 error(e); |
201 end |
202 end |
202 end); |
203 end); |
203 end |
204 end |