fix errors
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user