Writing to logs?!

Game development with Board Game Arena Studio
Post Reply
User avatar
Robo65
Posts: 105
Joined: 26 June 2019, 13:35

Writing to logs?!

Post by Robo65 »

Hello,

I can write self::debug() messages from my .game.php __constructor method.

But, self::debug() from setupNewGame doesn't work. Any tips what might be happening here?

Robo
vincentt
Posts: 254
Joined: 01 September 2017, 17:25

Re: Writing to logs?!

Post by vincentt »

Hi,

I use another approach when something doesn't work and I really do not understand it. I throw an exception that is displayed directly on the web page. I know for a fact that it works for setupnewgame, so if you have something that you do not understand this may help you.

About why self::debug() doesn't work in setupnewgame, I have no idea. I guess an admin should be able to help you (it may be a bug =/)

Vincent
User avatar
DrKarotte
Posts: 279
Joined: 22 September 2015, 23:42

Re: Writing to logs?!

Post by DrKarotte »

No idea, but maybe it's connected to this special behaviour of notifications sent during setup, i quote the doc:

"Notifications sent between the game start (setupNewGame) and the end of the "action" method of the first active state will never reach their destination."
Post Reply

Return to “Developers”