Page 1 of 1

$this->userPreferences->get() failing

Posted: 27 September 2025, 16:23
by crableybradtree
I am calling $this->userPreferences->get() in my first game state after manager gameSetup on the PHP side. Intermittently it is not retrieving a value and only returns the empty string.

Do I need to wait on the PHP side for something to happen beyond transitioning to the first game state for userPreferences to be reliably available?

Re: $this->userPreferences->get() failing

Posted: 27 September 2025, 16:57
by Victoria_La
How are you calling it? This works
$pref = (int) $this->userPreferences->get($player_id, $code);

Re: $this->userPreferences->get() failing

Posted: 27 September 2025, 22:03
by crableybradtree
I did not have the cast to integer before the call. I will give that a try. Thanks. :-)