Recently I got the error below in the function below as you see:
Error:
CompilerError: Stack too deep, try removing local variables.
I need to know if I should split the function into two, how should I do it?
Thanks
function setFees(uint256 _liquidityFee, uint256 _buybackFee, uint256 _reflectionFee, uint256 _marketingFee, uint256 _burnFee, uint256 _destributionFee, uint256 _feeDenominator) external authorized {
liquidityFee = _liquidityFee;
buybackFee = _buybackFee;
reflectionFee = _reflectionFee;
destributionFee = _destributionFee;
burnFee = _burnFee;
marketingFee = _marketingFee;
totalFee = _liquidityFee.add(_buybackFee).add(_reflectionFee).add(_destributionFee).add(_burnFee).add(_marketingFee);
feeDenominator = _feeDenominator;
require(totalFee < feeDenominator/4);
}