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

Error: Invalid number of arguments: 11? [closed]

Asked by 9 years ago

Please include the code which you are trying to use, so the community will be better-equipped to help you with your problem.

How could this possibly happen?

I have a table of positions and when I removed one from that table, this error popped up.

It happens during this loop at CFrame.new(unpack(Pos))

for PieceName, Piece in pairs(GameData.House[CurrentHouseName].Furniture) do        
    for _, Pos in pairs(Piece.Positions) do
        local Model = ReplicatedStorage.Housing.Furniture[PieceName]:Clone()
        local PieceCFrame = CFrame.new(unpack(Pos))
        Model.Parent = workspace[GameData.House[CurrentHouseName].Name].Interior.Furniture
        for _, Part in pairs(Model:GetChildren()) do
            if Part.Name == "MainPart" or Part:IsA("BasePart") then
                Model.PrimaryPart = Part
                break
            end
        end

        Model:SetPrimaryPartCFrame(InteriorCFrame:toWorldSpace(PieceCFrame))
    end
end

This is the line where I am removing the position from the table.

table.remove(_G.GameData.House[HouseName].Furniture[Piece.Name].Positions[i])
0
We need more info than that. Goulstem 8144 — 9y

Closed as Too Broad by Goulstem and TurboFusion

This question has been closed because it is too broad and is generally unanswerable. Please ask a more specific question.

Why was this question closed?