1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-12-12 11:10:29 +00:00

Use select()

This commit is contained in:
Wilma456 (Jakob0815) 2017-09-12 15:27:09 +02:00 committed by GitHub
parent 0115bc8dca
commit 92f5860de6

View File

@ -24,8 +24,9 @@ local g_defaultOutput = {
close = function( self )
end,
write = function( self, ... )
for k, v in ipairs( { ... } ) do
_G.write( v )
local nLimit = select("#", ... )
for n = 1, nLimit do
_G.write( select( n, ... ) )
end
end,
flush = function( self )
@ -118,8 +119,9 @@ function open( _sPath, _sMode )
self.bClosed = true
end,
write = function( self, ... )
for k, v in ipairs( { ... } ) do
file.write( v )
local nLimit = select("#", ... )
for n = 1, nLimit do
file.write( select( n, ... ) )
end
end,
flush = function( self )
@ -149,8 +151,9 @@ function open( _sPath, _sMode )
self.bClosed = true
end,
write = function( self, ... )
for k, v in ipairs( { ... } ) do
file.write( v )
local nLimit = select("#", ... )
for n = 1, nLimit do
file.write( select( n, ... ) )
end
end,
flush = function( self )