Fix some typos

master
rubenwardy 2016-03-30 00:39:22 +01:00
parent 8c073e1b0d
commit 59d220f9a2
2 changed files with 8 additions and 6 deletions

View File

@ -90,13 +90,14 @@ function ctf.count_players_in_team(team)
end
function ctf.new_player(name)
if not name then
if name then
ctf.players[name] = {
name = name
}
else
ctf.error("team", "Can't create a blank player")
ctf.log("team", debug.traceback())
end
ctf.players[name] = {
name = name
}
end
-- get a player

View File

@ -27,10 +27,11 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
-- Settings page
if fields.save then
ctf.gui.show(name, "settings")
local name = player:get_player_name()
local pdata = ctf.player(name)
local team = ctf.team(pdata.team)
ctf.gui.show(name, "settings")
if team and ctf.can_mod(name, pdata.team) then
if ctf.flag_colors[fields.color] then
team.data.color = fields.color