• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Own Function don't work

Perun

nems.online
Joined
May 1, 2009
Messages
412
Solutions
7
Reaction score
198
Hi!
My english isn't very good but.. ;D

I created 3 functions:

PHP:
function isTournamentOn()
local wynik;
	local storage = getGlobalStorageValue(9812);
	if storage == 2 then
	wynik = true;
		else
			wynik = false;
			end
	return wynik;
end

function getTournamentPlayers()
local players = {}
	return players
end

function addPlayerToTournament(cid)
if isPlayer(cid) then
	for i, pid in ipairs(getTournamentPlayers()) do
	table.insert(players, getPlayerName(cid))
end
	return true
	end
	end

The first function work good, but 2 and 3 don't work.
When i try use 3 function i don't see any error's but it don't insert playername to table from function nr 2 ;/
Please help!
 
Back
Top