Fix warnings in new luacheck

This commit is contained in:
rubenwardy 2018-04-06 16:18:32 +01:00
parent 6b8049f1aa
commit e3b12312e5
3 changed files with 4 additions and 3 deletions

View file

@ -11,13 +11,13 @@ math.randomseed(os.time())
random_messages = {}
random_messages.messages = {} --This table contains all messages.
function table.count( t )
function table.count( t ) -- luacheck: ignore
local i = 0
for k in pairs( t ) do i = i + 1 end
return i
end
function table.random( t )
function table.random( t ) -- luacheck: ignore
local rk = math.random( 1, table.count( t ) )
local i = 1
for k, v in pairs( t ) do