Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What is causing this error?

Asked by 10 years ago

I cannot for the like of me determine what's causing this error. The relevant code for the script is located here, and the error + part that's erroring is below:

--[[

20:48:03.053 - An error occurred
20:48:03.054 - Script 'Workspace.GetProperties', Line 388 - upvalue cmdCompile
20:48:03.054 - Script 'Workspace.GetProperties', Line 393 - local cmdCompile
20:48:03.055 - Script 'Workspace.GetProperties', Line 399
20:48:03.056 - Stack End

]]
local function cmdCompile(obj)
 local str = "Create(\""..obj.ClassName.."\"){\n"
 local num = 0
 for i, v in pairs(getProperties(obj.ClassName, dTags)) do
  local strV = getStringVersion(obj[i], { }) -- Line 388
  str = str..i.." = "..strV..";\n"
  num = num + 1
 end
 for i, v in pairs(obj:GetChildren()) do
  str = str..cmdCompile(v)..";\n" -- Line 393
 end
 str = str.."}"
 return str
end

print(cmdCompile(workspace)) -- This is line 399, and it was for testing purposes

If I remove the second for loop it works just fine, but that rather limits my uses for this script, so...

0
Can we have the full, reproducible code? This error seems like something going awry with obtaining something from a ROBLOX object, but can't be sure without personal tests. MrNicNac 855 — 10y

Answer this question