From 510f5968206c9c8920db7d4096a8321a4ef7aa24 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 21 May 2012 21:54:04 +0300 Subject: [PATCH] more little update for marketplace --- Templates/Build/17.tpl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Templates/Build/17.tpl b/Templates/Build/17.tpl index cf71a871..68b9fb0e 100644 --- a/Templates/Build/17.tpl +++ b/Templates/Build/17.tpl @@ -14,7 +14,7 @@ var carry = maxcarry; ?>; //--> getVilWref($_POST['x'],$_POST['y']); $checkexist = $database->checkVilExist($getwref); @@ -23,7 +23,7 @@ else if($_POST['dname']!=""){ $getwref = $database->getVillageByName($_POST['dname']); $checkexist = $database->checkVilExist($getwref); } -if(isset($_POST['ft'])=='check' && $allres!=0 && ($_POST['x']!="" && $_POST['y']!="" or $_POST['dname']!="") && $checkexist){ +if(isset($_POST['ft'])=='check' && $allres!=0 && $allres <= $market->maxcarry && ($_POST['x']!="" && $_POST['y']!="" or $_POST['dname']!="") && $checkexist){ ?>
@@ -201,6 +201,10 @@ if(isset($_POST['ft'])=='check'){ }elseif(!$_POST['x'] && !$_POST['y'] && !$_POST['dname']){ $error = 'Enter coordinates or village name.'; } + }elseif($allres <= $market->maxcarry){ + $error = 'Too few merchants.'; + } + $allres <= $market->maxcarry echo $error; } ?>