error CS1525: Unexpected symbol `[', expecting `.'

idk what the problem is. ive tried to find it and try re-codeding im lost and any help would make me happy
**{
*if (generateStrips)

			mesh.SetTriangles(int[], int )
		
		else
			mesh.triangles = triangles;
		}
		
		return mesh;
	}***

Sometimes error is in previous lines, rather in the error message line.
So, try to seek up from error line.

You should not be making an array in the call of the function, since the array would be empty, setting no triangles for the submesh. I notice that you already have a triangles variable which you may want to use for the function. You also need a variable for the submesh number. Your code should look similar to this:

int triangles;
int submeshNumber;
Mesh mesh;
boolean generateStrips;

//Some other code goes here...
if (generateStrips){
   mesh.SetTriangles(triangles,submeshNumber);
}
else {
   mesh.triangles = triangles;
}
return mesh;
//The rest of your code...