Game.php instead of name.game.php

Game development with Board Game Arena Studio
Post Reply
User avatar
Kayvon
Posts: 1069
Joined: 17 October 2011, 01:39

Game.php instead of name.game.php

Post by Kayvon »

According to https://boardgamearena.com/doc/Main_gam ... e.game.php there's a new modules/php/Game.php that takes the place of the old yourgamename.game.php. True to form, that's what appears in the new template when create a new project.

However, when I actually try using it, I get this error:

Unexpected error: Propagating error from gameserver 1 (method: createGame): Fatal error during [gamename] setup: Legacy game module not found: gamename.game.php (reference: GS1 03/01 16:56:55) (reference: GS0 03/01 16:56:55)

I'm trying to be a Good Developer and adopt the new system, but it looks broken. Has anyone successfully used it?
User avatar
thoun
Posts: 1620
Joined: 10 December 2020, 22:25

Re: Game.php instead of name.game.php

Post by thoun »

It searches for a class \Bga\Games\YourGameName on modules/php/Game.php
If not found, it will try to find the old name, and show the error you see if not found too.

What is the namespace / class declaration of your modules/php/Game.php file ? (the generated file should be good anyway)
User avatar
Kayvon
Posts: 1069
Joined: 17 October 2011, 01:39

Re: Game.php instead of name.game.php

Post by Kayvon »

The name is parkstwo. I should have saved off a copy of the original Game.php template before overwriting it.
User avatar
Kayvon
Posts: 1069
Joined: 17 October 2011, 01:39

Re: Game.php instead of name.game.php

Post by Kayvon »

Yes, definitely a capitalization issue. Thanks for pointing me in the right direction.
Post Reply

Return to “Developers”