I found the problem, but I don't understand it.
It appears the problem was in the function kwoonByName. This function takes a name and attempts to fill the object with the correct values (like the constructor, except the constructor takes the id and in this case the id isn't known, but the name is).
Here is the code, once I removed it (actually I combined it with another function) it works just fine:
Code:
// return kwoon id by kwoon name
function kwoonByName($inputKwoonName) {
// database connection info
require ("dlgame.php");
// check for persistant database connection
mysql_pconnect("localhost", $dbuser, $dbpass);
$query = "SELECT * from players where kwoon='$inputKwoonName'";
$result = mysql_db_query($dbname, $query);
$outKwoon = mysql_fetch_assoc ($result);
$this = $outKwoon;
mysql_free_result($result);
}
Bookmarks