Hi Chiem,


>If you create an action, and inside that action you do a get_attribute on the state machine, and that state machine (MSM) is a

>sub-statemachine of another (parent) MSM, and that sub-machine state happens to be the initial state of the parent machine

>(that's a lot of ifs!), the code will not compile. It aborts with the mysterious error:

<snip>

>BOOST_MSM_EUML_ACTION(someAction)
>{
>  template <class Event,class FSM,class STATE>
>  void operator()(Event const& event,FSM& fsm, STATE&)
> {
>  fsm.get_attribute(borrowedBuffer_attribute)=1;

> }
>};

Try:

BOOST_MSM_EUML_ACTION(someAction)
{
   template <class Event,class FSM,class STATE>
   void operator()(Event const& event,FSM& , STATE& state)
   {
      state.get_attribute(borrowedBuffer_attribute)=1;

   }
 };

MSM_A_player is a state machine, but used inside MSM_B_player, it is a substate, right? Therefore, in its entry, it is represented by the STATE parameter, not FSM.

 

HTH,

Christophe