From 27790c69a89dd6bcb77f6a301a923f19c56cc8c6 Mon Sep 17 00:00:00 2001 From: Max Cahill <1bardesign@gmail.com> Date: Tue, 7 Apr 2020 13:56:00 +1000 Subject: [PATCH] [added] state_machine:_call supports varargs --- state_machine.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/state_machine.lua b/state_machine.lua index 5c804cd..5e55abf 100644 --- a/state_machine.lua +++ b/state_machine.lua @@ -38,11 +38,11 @@ function state_machine:_get_state() return self.states[self.current_state] end ---make an internal call, with up to 4 arguments -function state_machine:_call(name, a, b, c, d) +--make an internal call +function state_machine:_call(name, ...) local state = self:_get_state() if state and type(state[name]) == "function" then - return state[name](self, state, a, b, c, d) + return state[name](self, state, ...) end return nil end