aboutsummaryrefslogtreecommitdiffstats
path: root/inc/mine.inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc/mine.inc')
-rw-r--r--inc/mine.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/inc/mine.inc b/inc/mine.inc
index aea04ad..94a2c66 100644
--- a/inc/mine.inc
+++ b/inc/mine.inc
@@ -1,20 +1,20 @@
<?php
function initCraftMine() {
- $_SESSION["mine"] = array("mine" => 0, "gold" => 0, "miners" => 1);
+ $_SESSION["mine"] = array("mine" => 0, "gold" => 0, "miners" => 0);
}
function withdrawMine() {
$amount = intval($_POST["amount"]);
if($amount == 0) return;
$_SESSION["mine"]["gold"] += $amount;
- echo $_SESSION["mine"]["gold"];
+ echo json_encode($_SESSION["mine"]["gold"]);
}
function sendMine() {
if(empty($_SESSION["mine"])) initCraftMine();
$mine = $_SESSION["mine"];
- echo $mine["gold"];
+ return $mine["gold"];
}