next = ag.next type = ag.type pairs = function(table) return next, table, nil end ipairs = function(table) local iter_func = function(t, i) i = i + 1 if t[i] == nil then return nil else return i, t[i] end end return iter_func, table, 0 end ag.createAMotor = function(obj1, obj2, axis0, axis1, axis2) local function setAMotorAxis(amotor, anum, axis) end local o1 = obj1 local o2 = obj2 local num_axes = 1 if (type(obj1) == "number") then if (obj1 == 0) then o1 = { id = 0 } end end if (type(obj2) == "number") then if (obj2 == 0) then o2 = { id = 0 } end end local num_axes = 0 if (axis0 ~= nil) then setAMotorAxis(0, axis0) num_axes = 1 if (axis1 ~= nil) then setAMotorAxis(1, axis1) num_axes = 1 if (axis2 ~= nil) then setAMotorAxis(2, axis2) num_axes = 2 end end end ag.setAMotorNumAxes(num_axes) end