Page 1 of 1

gameoption trouble

Posted: 27 April 2021, 08:00
by n_e_s_s_u_n_o
Hello everyone,
it's 2 weeks that I cannot use gameoption, when I do a Reload Game Options Configuration I always get part of my file and

array (
200 =>
array (
'name' => totranslate('Display tooltips'),
'needReload' => false,
'generic' => true,
'values' =>
array (
0 =>
array (
'name' => totranslate('Enabled'),
),
1 =>
array (
'name' => totranslate('Disabled'),
),
),
),
)

that I never put in my file. Of course addressing all the other options doesn't work anymore.
I have this problem with all my Gameoption files.
Anyone can help?
Thank you.
Paolo

Re: gameoption trouble

Posted: 27 April 2021, 08:50
by Tisaac
n_e_s_s_u_n_o wrote: 27 April 2021, 08:00 Hello everyone,
it's 2 weeks that I cannot use gameoption, when I do a Reload Game Options Configuration I always get part of my file and

array (
200 =>
array (
'name' => totranslate('Display tooltips'),
'needReload' => false,
'generic' => true,
'values' =>
array (
0 =>
array (
'name' => totranslate('Enabled'),
),
1 =>
array (
'name' => totranslate('Disabled'),
),
),
),
)

that I never put in my file. Of course addressing all the other options doesn't work anymore.
I have this problem with all my Gameoption files.
Anyone can help?
Thank you.
Paolo
This is standard user preference handled by BGA framework, this is not the source of your issue.
Please post your full gameoptions.php

Re: gameoption trouble

Posted: 27 April 2021, 09:06
by n_e_s_s_u_n_o
here is my full gameoption.inc.php except for initial comments:

<?php

$game_options = array(
100 => array(
'name' => totranslate('must get if possibile'),
'values' => array(1 => array( 'name' => totranslate('always')),
2 => array( 'name' => totranslate('optional')),
),
'default' => 2
),
200 => array(
'name' => totranslate('card type'),
'values' => array(1 => array( 'name' => totranslate('Bresciane')),
2 => array( 'name' => totranslate('French')),
),
'default' => 1
),
);


and this is the log result of button Reload Game Options Configuration:

Reloading game options for game cicerabigiapb
New gameoptions.inc.php is now in place:


array (
100 =>
array (
'name' => totranslate('must get if possibile'),
'values' =>
array (
1 =>
array (
'name' => totranslate('always'),
),
2 =>
array (
'name' => totranslate('optional'),
),
),
'default' => 2,
),
)
array (
200 =>
array (
'name' => totranslate('Display tooltips'),
'needReload' => false,
'generic' => true,
'values' =>
array (
0 =>
array (
'name' => totranslate('Enabled'),
),
1 =>
array (
'name' => totranslate('Disabled'),
),
),
),
)

Re: gameoption trouble

Posted: 27 April 2021, 09:21
by thoun
Try with id 101 instead of 200, which is id of bga framework option, it probably override your option

Re: gameoption trouble

Posted: 27 April 2021, 10:17
by n_e_s_s_u_n_o
Thanks, it's strange becouse yesterday I try with id 150 and didn't work as well. Using 101 works. Thank you

Re: gameoption trouble

Posted: 27 April 2021, 10:42
by n_e_s_s_u_n_o
Still trouble. When I refer to this.prefs in .js it contains only the 200 option, my 100 and 101 are not present.

Any hint?

Thank you
Paolo

Re: gameoption trouble

Posted: 27 April 2021, 11:26
by Tisaac
Did you add them to game options or user prefs ?

Re: gameoption trouble

Posted: 27 April 2021, 11:29
by n_e_s_s_u_n_o
They are in gameoptions.inc.php. Then I define 2 variable with index 100 and 101 in initGameStateLabels.

Re: gameoption trouble

Posted: 27 April 2021, 11:39
by n_e_s_s_u_n_o
Sorry misunderstand documentation. Move to user pref.