Need help with: error CS1501: No overload for method `StandardBlock' takes `9' arguments

Hello,

I am wondering if someone can help me out a little here. I am still learning unity coding and getting a little confused.

Here is my situation:

-I am using the VoxelModule from the asset store
-Modifying the code to using materials instead of colors
-I have cleaned up most of the error I cause by changing from ‘color’ to ‘material’ but stuck on these last two errors.
-Hoping someone can tell me what I should be looking for (not the exact code but in general) in the rest of to fix.

Assets/Scripts/BlockTesselator.cs(30,33): error CS1501: No overload for method StandardBlock' takes 9’ arguments

Assets/Scripts/BlockTesselator.cs(33,33): error CS1501: No overload for method FlowerBlock' takes 9’ arguments

Here is the part of the code where the errors are coming from:

    public static void tessellate(int sides, int corners, int x, int y, int z, ref List<Vector3> newVertices, ref List<int> newTriangles, ref int vertexCount,ref Material primaryColor, int renderType)
    {
        switch(renderType)
        {
            case 1:
                StandardBlock(sides, corners, x, y, z, ref newVertices, ref newTriangles, ref vertexCount,ref primaryColor);
            break;
            case 2:
                FlowerBlock(sides, corners, x, y, z, ref newVertices, ref newTriangles, ref vertexCount,ref primaryColor);
            break;
            default: break;
        }
    }

Here is what the original code looked like:

    public static void tessellate(int sides, int corners, int x, int y, int z, ref List<Vector3> newVertices, ref List<int> newTriangles, ref int vertexCount, ref List<Color> newColors, Color primaryColor, Color secondaryColor, Color tertiaryColor, int[] aoColors, int renderType)
    {
        switch(renderType)
        {
            case 1:
                StandardBlock(sides, corners, x, y, z, ref newVertices, ref newTriangles, ref vertexCount, ref newColors, primaryColor, aoColors);
            break;
            case 2:
                FlowerBlock(sides, corners, x, y, z, ref newVertices, ref newTriangles, ref vertexCount, ref newColors, primaryColor, secondaryColor, tertiaryColor);
            break;
            default: break;
        }
    }

It means you are putting in more or less parameters when calling it than the actual function has. Find where you are using the function and count.

Ok,

So basically I need to go through the code and remove / change the variables I modified.

I removed:

  • secondaryColor
  • tertiaryColor
  • aoColors

So I just need to make sure they don’t show up anywhere else in the code? (more or less)

No, it means that the function you modified gets called somewhere with a different number of parameters. Double click on the error to see where in your code.