add checks for gate definition errors
This commit is contained in:
@@ -145,7 +145,10 @@ while 1 do
|
||||
i = i + 4
|
||||
elseif data[i] == "G" then
|
||||
local objref = tonumber(data[i+1])
|
||||
local definition = sim:getdefinitionbyref(tonumber(data[i+2])) or GateDefinition
|
||||
local definition = sim:getdefinitionbyref(tonumber(data[i+2]))
|
||||
|
||||
assert(definition, "No gate definition for objref "..objref)
|
||||
|
||||
local position = vectotable(data[i+3])
|
||||
local rotation = tonumber(data[i+4])
|
||||
local gate = definition:constructgate(objref, position, rotation)
|
||||
|
||||
Reference in New Issue
Block a user