Code: Select all
[18:00:03.00] B0 Remote API: error while calling function 'GetObjects': [string "CUSTOMIZATION SCRIPT b0RemoteApiServer"]:819: One of the function's argument type is not correct. (sim.getObjects)
"GetObjects(...)" has two potential issues:
1) Undefined variable "handle" on line 821
2) No iteration of i
The function copied here:
Code: Select all
function GetObjects(...)
debugFunc("GetObjects",...)
local objType=...
local retVal={}
local i=0
local h=sim.getObjects(i,objType)
while h>=0 do
retVal[#retVal+1]=handle
h=sim.getObjects(i,objType)
end
return retVal
end
2) I believe "i = i +1" needs to be inserted before the second call to sim.getObjects(i, objType)