diff --git a/src/actions/towns.php b/src/actions/towns.php index 9e80384..960f9d4 100644 --- a/src/actions/towns.php +++ b/src/actions/towns.php @@ -214,9 +214,9 @@ function buy(int $id) $toChange = $special[0]; $changeAmount = $index === 0 ? $special[1] : -$special[1]; - user()[$toChange] += $changeAmount; + user()->$toChange += $changeAmount; $specialFields[] = "$toChange = ?"; - $specialValues[] = user()[$toChange]; + $specialValues[] = user()->$toChange; // Adjust attack or defense power if ($toChange == "strength" || $toChange == "dexterity") {