fix errors

This commit is contained in:
Redo
2022-11-04 13:14:05 -06:00
parent cdbf3ed089
commit 0ac3f3e495
4 changed files with 20 additions and 28 deletions

View File

@@ -76,11 +76,11 @@ function network_update()
local logic = data[i+5]
local input = data[i+6]
local global = data[i+7]
local code = data[i+8]
local numports = tonumber(data[i+9])
--local code = data[i+8]
local numports = tonumber(data[i+8])
local ports = {}
for a = i+10, numports*5+i+9, 5 do
for a = i+9, numports*5+i+8, 5 do
local portd = {
type = tonumber(data[a]),
position = vectotable(data[a+1]),
@@ -93,10 +93,10 @@ function network_update()
if not portd.direction then print(line) end
end
local definition = GateDefinition.new(objref, name, desc, init, logic, input, global, ports, code)
local definition = GateDefinition.new(objref, name, desc, init, logic, input, global, ports)
Simulation.addgatedefinition(sim, definition)
i = i + 9 + numports*5
i = i + 8 + numports*5
elseif data[i] == "SL" then
local wire = Simulation.getwirebyref(sim, tonumber(data[i+1]))
if wire ~= nil then