Net Library help

I know that net.Writebyte is no longer a function but I was wondering if garry made anything to replace it OR if there is some sort of hacky method to fix this.

I am updating the starfall processor (or trying to…) and getting this error



[ERROR] addons/starfall - (updating)/lua/weapons/gmod_tool/stools/wire_starfall_processor.lua:119: attempt to call field 'WriteByte' (a nil value)
  1. func - addons/starfall - (updating)/lua/weapons/gmod_tool/stools/wire_starfall_processor.lua:119
   2. unknown - lua/includes/modules/net.lua:31


[lua]
if net then
net.Receive(“starfall_processor_requpload”, function(len, ply)
if not SF.Editor.editor then return end

	local ent = net.ReadEntity()
	local code = SF.Editor.getCode()
	
	local ok, buildlist = SF.Editor.BuildIncludesTable()
	if ok then
		net.Start("starfall_processor_upload")
			net.WriteEntity(ent)
			net.WriteString(buildlist.mainfile)
			net.WriteByte(buildlist.filecount)     --<-- That is line 119
			for name, file in pairs(buildlist.files) do
				net.WriteString(name)
				net.WriteString(file)
			end
			
		net.SendToServer()
	else
		WireLib.AddNotify("File not found: "..buildlist,NOTIFY_ERROR,7,NOTIFYSOUND_ERROR1)
	end
end)

else
[/lua]

And this is the function that builds the filecount

[lua]
function SF.Editor.BuildIncludesTable(maincode, codename)
local tbl = {}
maincode = maincode or SF.Editor.getCode()
codename = codename or SF.Editor.getOpenFile() or “main”
tbl.mainfile = codename
tbl.files = {}
tbl.filecount = 0
tbl.includes = {}

local loaded = {}
local ppdata = {}

local function recursiveLoad(path)
	if loaded[path] then return end
	loaded[path] = true
	
	local code
	if path == codename and maincode then
		code = maincode
	else
		code = file.Read("Starfall/"..path) or error("Bad include: "..path,0)
	end
	
	tbl.files[path] = code
	SF.Preprocessor.ParseDirectives(path,code,{},ppdata)
		
	if ppdata.includes and ppdata.includes[path] then
		local inc = ppdata.includes[path]
		if not tbl.includes[path] then
			tbl.includes[path] = inc
			tbl.filecount = tbl.filecount + 1
		else
			assert(tbl.includes[path] == inc)
		end
			
		for i=1,#inc do
			recursiveLoad(inc*)
		end
	end
end
local ok, msg = pcall(recursiveLoad, codename)
if ok then
	return true, tbl
elseif msg:sub(1,13) == "Bad include: " then
	return false, msg
else
	error(msg,0)
end

end
[/lua]