I know this is my first complex, village mod for 1.0.x, but I cannot figure out what I'm doing wrong for the life of me. The statistics in the accounts table are not getting updated. For example, I have this code:
case "cs":
output("After a grueling workout with Court, you actually feel stronger.`n`n");
output("YOU GAIN 1 STRENGTH!");
$session['user']['attack']+=1;
addnav("L?Return to the Lobby","runmodule.php?module=garrisons&op=lobby");
addnav("V?Return to the Village","village.php");
break;
When this case is performed, the text and navs appear properly, but the user's attack is not increased.
Also, a value from the accounts table is not being seen properly. Another code segment:
case "massage2":
if ($session['user']['gold'] < 200)
{
output("You rummage through your possessions but can't seem to find 200 gold pieces. Maybe another time.");
addnav("L?Return to the Lobby","runmodule.php?module=garrisons&op=lobby");
addnav("V?Return to the Village","village.php");
}
else
{
output("Bruno has an amazingly gentle touch for such a large man. After only 20 minutes, you feel great.`n`n");
$session['user']['gold']-=200;
<snip>
I tried to get a massage with 600 gold on hand, but the above evaluation was seen as true (that I had less than 200 gold). I have been through the code numerous times, and even tried reinstalling the module. The full script can be found at
http://dragonprime.net/users/Ironman/garrisons.txt. Any help is greatly appreciated!