mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-13 11:40:29 +00:00
Merge pull request #440 from Wilma456/iomulti
Make io.write() accept multiple args
This commit is contained in:
commit
8d356f50c4
@ -23,8 +23,11 @@ local g_defaultOutput = {
|
||||
bClosed = false,
|
||||
close = function( self )
|
||||
end,
|
||||
write = function( self, _sText )
|
||||
_G.write( _sText )
|
||||
write = function( self, ... )
|
||||
local nLimit = select("#", ... )
|
||||
for n = 1, nLimit do
|
||||
_G.write( select( n, ... ) )
|
||||
end
|
||||
end,
|
||||
flush = function( self )
|
||||
end,
|
||||
@ -115,8 +118,11 @@ function open( _sPath, _sMode )
|
||||
file.close()
|
||||
self.bClosed = true
|
||||
end,
|
||||
write = function( self, _sText )
|
||||
file.write( _sText )
|
||||
write = function( self, ... )
|
||||
local nLimit = select("#", ... )
|
||||
for n = 1, nLimit do
|
||||
file.write( select( n, ... ) )
|
||||
end
|
||||
end,
|
||||
flush = function( self )
|
||||
file.flush()
|
||||
@ -144,8 +150,11 @@ function open( _sPath, _sMode )
|
||||
file.close()
|
||||
self.bClosed = true
|
||||
end,
|
||||
write = function( self, _number )
|
||||
file.write( _number )
|
||||
write = function( self, ... )
|
||||
local nLimit = select("#", ... )
|
||||
for n = 1, nLimit do
|
||||
file.write( select( n, ... ) )
|
||||
end
|
||||
end,
|
||||
flush = function( self )
|
||||
file.flush()
|
||||
|
Loading…
Reference in New Issue
Block a user