Search found 15 matches

by tony58uk
28 January 2025, 16:26
Forum: Developers
Topic: Passing data to tpl file
Replies: 4
Views: 78

Re: Passing data to tpl file

OMG

Fixed, thanks. I knew it was something silly!!!!
by tony58uk
28 January 2025, 16:17
Forum: Developers
Topic: Passing data to tpl file
Replies: 4
Views: 78

Re: Passing data to tpl file

I've changed it to this const jstpl_player_board = (type) => '<div class="cp_board"><div class="die dietype_${type}"></div></div>'; But it's still not passing data through. When I inspect the element ${type} is there instead of the data I'm trying to pass. I'm missing something s...
by tony58uk
28 January 2025, 15:52
Forum: Developers
Topic: Passing data to tpl file
Replies: 4
Views: 78

Passing data to tpl file

Hi all, I'm having an issue I would like some help with please. I'm trying to create custom player boards in the score area. In the tpl file I have the following code const jstpl_player_board = (type) => '<div class="cp_board"> <div class="die dietype_${type}" id="cp_die_${i...
by tony58uk
22 July 2024, 22:49
Forum: Developers
Topic: Accessing double key array from JS
Replies: 4
Views: 258

Re: Accessing double key array from JS

Okay thanks all, I'll have a look at some of those suggestions tomorrow.
by tony58uk
18 July 2024, 20:56
Forum: Developers
Topic: Accessing double key array from JS
Replies: 4
Views: 258

Accessing double key array from JS

Hi all, I'm having real problems. I want to test if a value exists at a certain location within a double-key array. My code is as follows (JS) if ((board[(die_x + 1)][die_y] === undefined) && (board[(die_x + 2)][die_y] === undefined) && (board[(die_x + 3)][die_y] === undefined)) { re...
by tony58uk
08 July 2024, 09:26
Forum: Developers
Topic: Using bgaPerformAction with a Array as a arg
Replies: 2
Views: 244

Re: Using bgaPerformAction with a Array as a arg

Thanks!!! I worked it out from your examples. I thought I might have to implode and then explode the arg. It contains letters so doing it is slightly different. Also, you have to use ' ' (space) as a ',' isn't allowed in the AT_alphanum arg. All sorted now cheers!!!!! JS code console.log("AJAX ...
by tony58uk
08 July 2024, 08:12
Forum: Developers
Topic: Using bgaPerformAction with a Array as a arg
Replies: 2
Views: 244

Using bgaPerformAction with a Array as a arg

Hi there, I'm having an issue I'd like help with please. I'm trying to pass an array through the bgaPerformAction method but getting the error: Bad argument type: dice_array should be a value from the enumeration (5_7_apep) Can arrays not be passed through? I cannot find an answer anywhere... If I c...
by tony58uk
26 January 2024, 21:33
Forum: Developers
Topic: Initializing Stats
Replies: 7
Views: 1548

Re: Initializing Stats

Just gonna go with the obvious: where does 'startsWith' come from? Fatal error: Uncaught Error: Call to undefined function startsWith() do you mean 'str_starts_with' ? Oh wow I put this code in cookbook and nobody run it I guess, I usually have global definied for this function since php did not ha...
by tony58uk
18 January 2024, 19:22
Forum: Developers
Topic: Initializing Stats
Replies: 7
Views: 1548

Re: Initializing Stats

Hi there, I added some dummy Stats to the JSON file but still getting the same error. Here is the full output. Unexpected error: Wrong formatted data from gameserver 1 (method: createGame): JSON_ERROR_SYNTAX Fatal error: Uncaught Error: Call to undefined function startsWith() in /var/tournoi/release...
by tony58uk
18 January 2024, 19:06
Forum: Developers
Topic: Initializing Stats
Replies: 7
Views: 1548

Re: Initializing Stats

Jonathan2004 wrote: 18 January 2024, 15:41 Your stats.json file is empty

more infos here : https://en.doc.boardgamearena.com/Game_ ... stats.json
Oh thanks, I'll have a look at that :)

Go to advanced search