cleaned up file stuff in ExportLevel
This commit is contained in:
		
							parent
							
								
									70958c5762
								
							
						
					
					
						commit
						8cfc6a9d18
					
				@ -1,7 +1,9 @@
 | 
				
			|||||||
function ExportLevel(levelname, filename)
 | 
					function ExportLevel(levelname, filename)
 | 
				
			||||||
	os.execute( "mkdir \"./export\"" )
 | 
						love.filesystem.createDirectory("export")
 | 
				
			||||||
	filename = filename or "output.lua"
 | 
						filename = filename or "output.lua"
 | 
				
			||||||
 | 
						if string.sub(filename, 1, 1) ~= "/" then
 | 
				
			||||||
		filename = "export/"..filename
 | 
							filename = "export/"..filename
 | 
				
			||||||
 | 
						end
 | 
				
			||||||
	exportFile = io.open(filename, "w+")
 | 
						exportFile = io.open(filename, "w+")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if exportFile then
 | 
						if exportFile then
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user