summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRubenwardy <anjayward@gmail.com>2013-02-22 19:37:21 +0000
committerRubenwardy <anjayward@gmail.com>2013-02-22 19:37:21 +0000
commit2942ae602b1262748e6903a3bd33078879060f7e (patch)
tree652a06b2c107eccbfdca6cac24faf5612b6cd98b
parent6a982c03be4e52001e0f9b472b05ea27d274e615 (diff)
fix list_awards error
-rw-r--r--init.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/init.lua b/init.lua
index 53a0081..56fd34b 100644
--- a/init.lua
+++ b/init.lua
@@ -65,9 +65,8 @@ minetest.register_chatcommand("list_awards", {
func = function(name, param)
minetest.chat_send_player(name, "Your awards:");
- for i=1,# player_data[name]['unlocked'] do
- print(player_data[name]['unlocked'][i])
- minetest.chat_send_player(name, ">> "..player_data[name]['unlocked'][i]);
+ for _, str in pairs(player_data[name].unlocked) do
+ minetest.chat_send_player(name, str);
end
end,
})