Replay of Game not working because of DB modification?
Posted: 04 September 2020, 12:21
In the game cribbage, I have settings that the user can set on the client but update the database
(this would be similar to the Auto-Hammer in DiceForge)
When I try to replay a game after choosing the player I want to be I get the following error
Basically it sets two boolean columns in the DB that the server then uses to determine if it should cut the cards, or declare a go on behalf of the player
I am assuming the error is related to the fact that a replay DB cannot be modified?
I don't know how to stop that code from firing though because during a replay is false, so I can't use that
Has anyone run into this error before ?
(this would be similar to the Auto-Hammer in DiceForge)
When I try to replay a game after choosing the player I want to be I get the following error
The method setInitialPreferences is thisly_studio.js:2 During pageload
Cannot read property 'data' of undefined
TypeError: Cannot read property 'data' of undefined
at Object.ajaxcall (https://x.boardgamearena.net/data/theme ... s:2:639210)
at Object.setInitialPreference (https://x.boardgamearena.net/data/theme ... js:1:14271)
at Object.setup (https://x.boardgamearena.net/data/theme ... .js:1:8742)
at Object.completesetup (https://x.boardgamearena.net/data/theme ... s:2:572801)
at https://boardgamearena.com/archive/repl ... 8;:2196:24
at _ce (https://x.boardgamearena.net/data/theme ... js:8:12390)
at _37 (https://x.boardgamearena.net/data/theme ... js:8:14010)
at https://x.boardgamearena.net/data/theme ... js:8:14274
at _38 (https://x.boardgamearena.net/data/theme ... js:8:14100)
at _81 (https://x.boardgamearena.net/data/theme ... js:8:14199)
Code: Select all
setInitialPreference: function (action, autoGo, autoCut) {
this.ajaxcall("/" + this.game_name + "/" + this.game_name + "/" + action +".html", {
autoGo: autoGo,
autoCut: autoCut,
lock: true
}, this, function (result) {
console.log(result);
}, function (is_error) {
console.log(is_error);
});
},
I am assuming the error is related to the fact that a replay DB cannot be modified?
I don't know how to stop that code from firing though because during a replay
Code: Select all
this.isSpectatorHas anyone run into this error before ?