Solved: t.indexOf is not a function error

Game development with Board Game Arena Studio
Post Reply
User avatar
Hutilointia
Posts: 8
Joined: 27 January 2021, 18:18

Solved: t.indexOf is not a function error

Post by Hutilointia »

Hi,

Any idea why a state change might cause this error?

Code: Select all

Javascript error:
t.indexOf is not a function
TypeError: t.indexOf is not a function
at Function.o.parse (https://studio.boardgamearena.com:8084/data/themereleases/220420-1001/js/dojoroot/dojo/dojo.js:1:37609)
at r.on (https://studio.boardgamearena.com:8084/data/themereleases/220420-1001/js/dojoroot/dojo/dojo.js:1:42518)
at Function.o.emit (https://studio.boardgamearena.com:8084/data/themereleases/220420-1001/js/dojoroot/dojo/dojo.js:1:39041)
at Function.o.emit (https://studio.boardgamearena.com:8084/data/themereleases/220420-1001/js/dojoroot/dojo/dojo.js:1:39670)
at r.emit (https://studio.boardgamearena.com:8084/data/themereleases/220420-1001/js/dojoroot/dojo/dojo.js:1:42648)
at Object.publish (https://studio.boardgamearena.com:8084/data/themereleases/220420-1001/js/dojoroot/dojo/dojo.js:1:42289)
at Object.publish (https://studio.boardgamearena.com:8084/data/themereleases/220420-1001/js/dojoroot/dojo/dojo.js:1:36226)
at Object.dispatchNotification (https://studio.boardgamearena.com:8084/data/themereleases/220420-1001/js/modules/layer/ly_studio.js:1:474063)
at Object.dispatchNotifications (https://studio.boardgamearena.com:8084/data/themereleases/220420-1001/js/modules/layer/ly_studio.js:1:469859)
at Object.onNotification (https://studio.boardgamearena.com:8084/data/themereleases/220420-1001/js/modules/layer/ly_studio.js:1:466212)
I can reload and the game works fine, but I have no idea what would cause this error, and the stack trace isn't particularly helpful here.
Last edited by Hutilointia on 17 May 2022, 09:02, edited 1 time in total.
User avatar
Tisaac
Posts: 2736
Joined: 26 August 2014, 21:28

Re: t.indexOf is not a function error

Post by Tisaac »

You are probably missing something in your states.php, Can you give the corresponding code ?
User avatar
Hutilointia
Posts: 8
Joined: 27 January 2021, 18:18

Re: t.indexOf is not a function error

Post by Hutilointia »

Sorry, for some reason, the email notifications are not working on the forum. You can find all the game code on GitHub: https://github.com/msaari/bga-slovenian-tarokk.

The problematic transition is from state 52 to 60.
User avatar
Hutilointia
Posts: 8
Joined: 27 January 2021, 18:18

Re: t.indexOf is not a function error

Post by Hutilointia »

I figured it out: I had a notifyAllPlayers() function call without a name for the notification.
Post Reply

Return to “Developers”