aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--inc/messages.inc15
1 files changed, 15 insertions, 0 deletions
diff --git a/inc/messages.inc b/inc/messages.inc
new file mode 100644
index 0000000..f1ca8b3
--- /dev/null
+++ b/inc/messages.inc
@@ -0,0 +1,15 @@
+<?php
+
+$messages = array(
+ "shop_already_built" => "You have already built a shop.",
+ "gold_insufficient" => "You don't have enough gold.",
+ "shop_missing_item" => "This item does not exist.",
+);
+
+function sendError($msg) {
+ global $messages;
+ $text = $messages[$msg];
+ echo json_encode(array("error" => $text));
+}
+
+?>