fsm short syntax not working any more

About a half year ago I created game and it worked like charm. But now I tried to run it again and get following error:

Here is snippet from my code.

class ReactionGame(FSM):
...
    def enterStartup(self):
....


myfsm = ReactionGame()
myfsm.request_Startup()

I cant figure out what has changed - tried panda 1.6.2, 1.7.0 and latest 1.7.2 and still get the same error.

it would be quite time consuming to change every occurrence of request_ to request() call. So any help is appreciated.

Hi, following the manual, shouldn’t it be myfsm.request( ‘Startup’ )?

That’s true, but here panda3d.org/manual/index.php … _FSM_Usage is also following sample

# or, if you use short syntax
myfsm.request_Walk(1.0, BitMask32.bit(2))

And it worked before. :confused:

Anyhow I hacked little bit inside FSM.py file and it works again. With some help from here python.org/doc/essays/metaclasses/

Maybe that is not up-to-date.

Sorry, I didn’t realize that manual page still advocated that outdated syntax. I’ve removed the reference from that page. Are there any other references somewhere that we also need to remove?

At one point, we added that “feature” to FSM.py, but it was implemented with a cheesy Python hack that turned out to cause troubles in other contexts. So we removed it. I didn’t know anyone had ever heard about it, so my apologies for the confusion.

David

Ok, thanks for explanation. :slight_smile: