It looks like you're new here. If you want to get involved, click one of these buttons!
FSM = require "fsm" function action1() print("This is action 1") end function action2() print("This is action 2") end function action1() print("This is exceptionAction") end local stateTransitionTable = { {"state1", "event1", "state2", action1}, {"state2", "event2", "state1", action2}, {"*", "*", "state1", exceptionAction} } fsm = FSM.new(stateTransitionTable) print("Initial state " .. fsm:get()) fsm:fire("event1") |
Comments
http://giderosmobile.com/forum/discussion/1643/modules-should-be-excluded-from-execution/p1
By the way, it is very old fsm project, you should find some new project for fsm, like this?
https://github.com/recih/lua-fsm
I forked and updated it to use the new module style. If anyone is interested it can be found here.
http://github.com/bigtunacan/LuaFSM