fix indentation & fix crash on startup

This commit is contained in:
Zheyu Shen 2014-03-22 04:02:02 +00:00
parent 703626648c
commit 7884e6b424
1 changed files with 27 additions and 25 deletions

View File

@ -26,6 +26,8 @@ function random_messages.read_messages()
local input = io.open(minetest.get_worldpath().."/random_messages","r")
if not input then
local output = io.open(minetest.get_worldpath().."/random_messages","w")
output:write("Blame the server admin! He/She has probably not edited the random messages yet.\n")
output:write("Tell your dumb admin that this line is in (worldpath)/random_messages \n")
io.close(output)
input = io.open(minetest.get_worldpath().."/random_messages","r")
end