Fixed typos.

This commit is contained in:
Raimund Renkert 2015-03-09 15:01:05 +01:00
parent 3f5bf6c240
commit 5bf52b5de9

View File

@ -1,11 +1,11 @@
local time_interval = 1.0 local time_interval = 1.0
local fifo_path "/tmp/mt_players_fifo" local fifo_path = "/tmp/mt_players_fifo"
function players_data() function players_data()
ps = {} ps = {}
for _, player in ipairs(minetest.get_connected_players()) do for _, player in ipairs(minetest.get_connected_players()) do
local pos = player:getpos() local pos = player:getpos()
local name = player:get_player_name() local pname = player:get_player_name()
local data = { local data = {
name = pname, name = pname,
x = pos.x, x = pos.x,
@ -20,7 +20,7 @@ function time_interval_func()
local players = players_data() local players = players_data()
local fifo = io.open(fifo_path, 'w') local fifo = io.open(fifo_path, 'w')
if (fifo ~= nil) then if (fifo ~= nil) then
fifo.write(players) fifo:write(players)
fifo:close() fifo:close()
end end
minetest.after(time_interval, time_interval_func) minetest.after(time_interval, time_interval_func)