diff --git a/GameEngine/Database.php b/GameEngine/Database.php index d504c4a8..00fcba54 100755 --- a/GameEngine/Database.php +++ b/GameEngine/Database.php @@ -1678,7 +1678,7 @@ class MYSQLi_DB implements IDbConnection { } break; - case 3: if ($value['owner'] == $vid && $value['capital'] == 1) { + case 3: if ((isset($value['owner']) && isset($value['capital'])) && $value['owner'] == $vid && $value['capital'] == 1) { return $value; } break; @@ -1724,7 +1724,7 @@ class MYSQLi_DB implements IDbConnection { // by owner ID and capital = 1 case 3: $vid = (int) $vid; - $q = "SELECT * FROM " . TB_PREFIX . "vdata WHERE owner = $vid capital = 1 LIMIT 1"; + $q = "SELECT * FROM " . TB_PREFIX . "vdata WHERE owner = $vid AND capital = 1 LIMIT 1"; break; // by owner = Taskmaster diff --git a/Templates/res.tpl b/Templates/res.tpl index c256560b..fb5d3a98 100644 --- a/Templates/res.tpl +++ b/Templates/res.tpl @@ -1,4 +1,4 @@ - getProd("wood")); -$clay = round($village->getProd("clay")); -$iron = round($village->getProd("iron")); -$crop = round($village->getProd("crop")); -$totalproduction = $village->allcrop; // all crops + bakery + grain mill -?> +// Natars cration script does not have village initialized +if (!empty($village)) { + $wood = round( $village->getProd( "wood" ) ); + $clay = round( $village->getProd( "clay" ) ); + $iron = round( $village->getProd( "iron" ) ); + $crop = round( $village->getProd( "crop" ) ); + $totalproduction = $village->allcrop; // all crops + bakery + grain mill +?>

| - | + | - | gold <= 1){
echo ' '.$session->gold.' Gold';
}
@@ -56,11 +58,13 @@ $totalproduction = $village->allcrop; // all crops + bakery + grain mill
}
?>
|
-
-
-
-
+
+
+
+