1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-03-03 14:53:01 +02:00

Assign type to local

This commit is contained in:
Matthew Heguy 2019-02-15 11:54:33 -05:00
parent cb6595002a
commit ffff4116c2

View File

@ -57,9 +57,10 @@ local function player_joined(event)
end
local message
if type(messages) == 'string' then
local messages_type = type(messages)
if messages_type == 'string' then
message = messages
elseif type(messages) == 'table' then
elseif messages_type == 'table' then
message = messages[random(#messages)]
end