Panakotta00 / FicsIt-Networks

Control, Monitor, Manage and Automate your Satisfactory.
https://ficsit.app/mod/FicsItNetworks
GNU General Public License v3.0
155 stars 50 forks source link

Internet Card not working as intended? #230

Closed Skyamoeba closed 1 year ago

Skyamoeba commented 1 year ago

Describe the bug EEPROM:26: filesystem not open stack trackback: [C]: in method 'write'

Below code was working before update and now stops at write on line 26.

Expected behavior Open a file from github read functions and return info requested by the computer / program that is running in the below case to check if there is a new update for the mod / update to the program available.

Additional context currentModVer = 37 currentver = 0 Debug = true

-- Update Checker (part of boot up) function UpdateChecker() if Debug == true then print("System - Checking For Internet Card") end local card = computer.getPCIDevices(findClass("FINInternetCard"))[1] if not card then print("[ERROR] - No internet-card found! Please install a internet card!") computer.beep(0.2) return end

if Debug == true then print("System - Getting Ver.lua") end local req = card:request("https://raw.githubusercontent.com/Skyamoeba/FicsitManagerSystems/main/Ver.lua", "GET", "") local _, Ver = req:await() filesystem.initFileSystem("/dev") filesystem.makeFileSystem("tmpfs", "tmp") filesystem.mount("/dev/tmp","/") if Debug == true then print("System - Getting Ver.lua ...Complete") end if Debug == true then print("System - Opening Ver.lua") end

local file = filesystem.open("Ver.lua", "w") file:write(Ver) file:close() if Debug == true then print("System - Opening Ver.lua ...Complete") end filesystem.doFile("Ver.lua")

if Debug == true then print("System - Pulling Data from file") end ModVersion = MODVerD() ModVerPrint= MODVerP() VersionBatt= VerCheckBattD() VerPrint = VerCheckBattP() if Debug == true then print("System - Pulling Data from file ...Complete") print("") print("") end

if currentModVer < ModVersion then print("[FINSYS] : Update Avliable for Ficsit Networks") else print("[FINSYS] : Latest MOD Version Installed") end

if ModVersion < currentModVer then print("[FINSYS] : Program has not been tested on this FIN Version : "..MVer) end if VersionBatt > currentver then print("[System] - Update Avliable") else print("[System] - Latest Version Installed") end end --End Of Updater