aboutsummaryrefslogtreecommitdiffstats
path: root/inc/messages.inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc/messages.inc')
-rw-r--r--inc/messages.inc17
1 files changed, 17 insertions, 0 deletions
diff --git a/inc/messages.inc b/inc/messages.inc
new file mode 100644
index 0000000..d6ea87e
--- /dev/null
+++ b/inc/messages.inc
@@ -0,0 +1,17 @@
+<?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.",
+ "guild_not_yet_created" => "You need to create a guild first.",
+ "guild_already_built" => "You have aready built a guild."
+);
+
+function sendError($msg) {
+ global $messages;
+ $text = $messages[$msg];
+ echo json_encode(array("error" => $text));
+}
+
+?>