diff --git a/src/main/resources/assets/computercraft/lua/rom/apis/io.lua b/src/main/resources/assets/computercraft/lua/rom/apis/io.lua index 4667bf50d..0352ba64a 100644 --- a/src/main/resources/assets/computercraft/lua/rom/apis/io.lua +++ b/src/main/resources/assets/computercraft/lua/rom/apis/io.lua @@ -23,8 +23,10 @@ local g_defaultOutput = { bClosed = false, close = function( self ) end, - write = function( self, _sText ) - _G.write( _sText ) + write = function( self, ... ) + for k, v in ipairs( { ... } ) do + _G.write( v ) + end end, flush = function( self ) end, @@ -115,8 +117,10 @@ function open( _sPath, _sMode ) file.close() self.bClosed = true end, - write = function( self, _sText ) - file.write( _sText ) + write = function( self, ... ) + for k, v in ipairs( { ... } ) do + file.write( v ) + end end, flush = function( self ) file.flush() @@ -144,8 +148,10 @@ function open( _sPath, _sMode ) file.close() self.bClosed = true end, - write = function( self, _number ) - file.write( _number ) + write = function( self, ... ) + for k, v in ipairs( { ... } ) do + file.write( v ) + end end, flush = function( self ) file.flush()