mirror of
				https://github.com/SquidDev-CC/CC-Tweaked
				synced 2025-10-31 05:33:00 +00:00 
			
		
		
		
	Fix check of write()
if you call write(nil), you will get the error "bios.lua:229: bad argument: string expected, got nil", so nil is not a valid argument for write() and should be removed.
This commit is contained in:
		 Wilma456 (Jakob0815)
					Wilma456 (Jakob0815)
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							1fdfcdb5f2
						
					
				
				
					commit
					373b7ba293
				
			| @@ -206,8 +206,8 @@ function sleep( nTime ) | |||||||
| end | end | ||||||
|  |  | ||||||
| function write( sText ) | function write( sText ) | ||||||
|     if sText ~= nil and type( sText ) ~= "string" and type( sText ) ~= "number" then |     if type( sText ) ~= "string" and type( sText ) ~= "number" then | ||||||
|         error( "bad argument #1 (expected string, got " .. type( sText ) .. ")", 2 )  |         error( "bad argument #1 (expected string or number, got " .. type( sText ) .. ")", 2 )  | ||||||
|     end |     end | ||||||
|  |  | ||||||
|     local w,h = term.getSize()         |     local w,h = term.getSize()         | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user