Update eCash.lua
This commit is contained in:
		
							parent
							
								
									a1d2140017
								
							
						
					
					
						commit
						c20170a0a3
					
				
							
								
								
									
										13
									
								
								eCash.lua
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								eCash.lua
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -243,21 +243,16 @@ local loginButton = login:addButton()
 | 
			
		|||
        
 | 
			
		||||
        username = usernameInput:getText()
 | 
			
		||||
 | 
			
		||||
        if not fs.exists("/.usrcache") then
 | 
			
		||||
            local file = fs.open("/.usrcache","w") 
 | 
			
		||||
            file.write(username)
 | 
			
		||||
            file.close()
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        login:setVisible(false)
 | 
			
		||||
        appFrame:setVisible(true)
 | 
			
		||||
        refresh_ui()
 | 
			
		||||
    
 | 
			
		||||
    end)
 | 
			
		||||
 | 
			
		||||
if fs.exists("/.usrcache") then
 | 
			
		||||
    local file = fs.open("/.usrcache","r")
 | 
			
		||||
    local username = file.readLine()
 | 
			
		||||
if fs.exists("/config.json") then
 | 
			
		||||
    local file = fs.open("/config.json","r")
 | 
			
		||||
    local file_content = file.readAll()
 | 
			
		||||
    local username = textutils.unserialiseJSON(file_content).username
 | 
			
		||||
    file.close()
 | 
			
		||||
    usernameInput:setText(username)
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user