Fix nil value when starting a tournament while a tournament is already running

master
upsilon 2017-04-06 19:00:33 +02:00
parent a8be83e6bb
commit b234ae11fc
No known key found for this signature in database
GPG Key ID: A80DAE1F266E1C3C
1 changed files with 4 additions and 2 deletions

View File

@ -55,8 +55,10 @@ end
function pvpplus.start_tournament()
if tournament.running_tournament then
minetest.chat_send_player(starter_name, "There is already a running tournament.")
return false
if tournament.starting_infos.starter then
minetest.chat_send_player(tournament.starting_infos.starter, "There is already a running tournament.")
end
return false, "There is already a running tournament."
end
-- Stop engaging