ReferenceError: bgagame is not defined

Game development with Board Game Arena Studio
Post Reply
User avatar
ChrisGNZ
Posts: 5
Joined: 09 August 2012, 11:58

ReferenceError: bgagame is not defined

Post by ChrisGNZ »

Hello!

Sorry if this is a noob question, but I am new to the BGA development environment. I am incrementally fleshing code around the skeleton files, and am using Firefox with Firebug to track down my mistakes.

I thought I was progressing OK then all of a sudden I am receiving "ReferenceError: bgagame is not defined" errors in my Firebug console.

The offending line is in http://en.1.studio.boardgamearena.com/r ... table=5213

gameui = new bgagame.raidthepantry();

Firebug tells me that bgagame is undefined.

Now I can see earlier on, I can see this code block:

Code: Select all

<script type="text/javascript">
dojoConfig= {
parseOnLoad: true,
async: true,
useXDomain: false,
baseUrl: "http://1.studio.boardgamearena.com:8081/data/themereleases/130617-1135/js/dojoroot/dojo/",
packages: [{
name: "ebg",
location: "http://1.studio.boardgamearena.com:8081/data/themereleases/130617-1135/js/modules"
},{
name: "bgagame",
location: "http://1.studio.boardgamearena.com:8081/data/themereleases/130617-1135/games/raidthepantry/130617-1820/"
}],
dojoBlankHtmlUrl: "/blank.html",
cacheBust:true,
locale: 'en'
,isDebug: true
};
</script> 
If my nascent understanding of Dojo is correct, this should be creating a dojo package object called "bgagame" but for reasons beyond my level of understanding, it appears not to be doing so?

Any assistance or advice anyone can offer would be gratefully appreciated!

Regards
Chris
User avatar
sourisdudesert
Administrateur
Posts: 4630
Joined: 23 January 2010, 22:02

Re: ReferenceError: bgagame is not defined

Post by sourisdudesert »

Hi Chris,

Indeed this is a change introduced by the latest release. Your Javascript should declare "bgagame.raidthepantry", and not "ebg.raidthepantry" as before. I did an automatic "replace all" on all Studio JS scripts but for non obvious reason this did not work for you.

Now it is working :)

Cheers,
Post Reply

Return to “Developers”