 
                
                64 posts
                
                    
                        Location
                        C:\Minecraft\saves\stuff\computer
                    
                
             
            
                Posted 04 October 2018 - 06:19 PM
                So, right now I have this code:
local tmp = fs.open("filesystem.ufs", "r")
local ufs = textutils.unserialize(tmp.readAll())
tmp.close()It runs "fine". However, when I try to use the ufs table, it seems to be nil.
I have CC build 5 1.12.2 from 
http://cc.crzd.meWhy does this happen?
 
         
        
        
            
            
                
                     
                
                1426 posts
                
                    
                        Location
                        Does anyone put something serious here?
                    
                
             
            
                Posted 04 October 2018 - 07:06 PM
                Without knowing what the file looks like, we can't say for sure. However, at a guess it's not a valid table - double check that everything looks correct within filesystem.ufs.
                
             
         
        
        
            
            
                
                     
                
                64 posts
                
                    
                        Location
                        C:\Minecraft\saves\stuff\computer
                    
                
             
            
                Posted 04 October 2018 - 07:30 PM
                Without knowing what the file looks like, we can't say for sure. However, at a guess it's not a valid table - double check that everything looks correct within filesystem.ufs.
This is the table:
{
    "myfile.lua" = {
	    name = "myfile.lua",
	    type = "file",
	    contentloc = "90285",
    },
    filecontent = {
	    "90285" = "print(\"Hello!\")",
    },
}
Everything looks correct to me.
 
         
        
        
            
            
                
                     
                
                749 posts
                
                    
                        Location
                        BOO!!
                    
                
             
            
                Posted 04 October 2018 - 07:56 PM
                Try this:
{
   ["myfile.lua"] = {
                    name = "myfile.lua",
                    type = "file",
                    contentloc = "90285"
    },
    filecontent = {
                    ["90285"] = "print(\"Hello!\")"
    }
}
Edited on 04 October 2018 - 05:59 PM
                
             
         
        
        
            
            
                
                     
                
                64 posts
                
                    
                        Location
                        C:\Minecraft\saves\stuff\computer
                    
                
             
            
                Posted 05 October 2018 - 12:04 PM
                Try this:
{
   ["myfile.lua"] = {
					name = "myfile.lua",
					type = "file",
					contentloc = "90285"
	},
	filecontent = {
					["90285"] = "print(\"Hello!\")"
	}
}
Did that, fixed a few bugs I just found and it works! Thanks for the help, brotha.