0

i trying to deploy an token on remix and i got this error message:

CompilerError: Stack too deep, try removing local variables. --> bestTokenEver.sol:1027:80: | 1027 | (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tLiquidity, tCharity, tTeam, _getRate()); | ^^^^^^^

function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256) {
    (uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity, uint256 tCharity, uint256 tTeam) = _getTValues(tAmount);
    (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tLiquidity, tCharity, tTeam, _getRate());
    return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tLiquidity, tCharity, tTeam);
}

i dont really understand why i got this error message. is one of the lines maybe to long and how can i fix it?

hope you can help me

edit: the solution from other post dont works here:

// Helps to avoid "Stack too deep" in swap() method function _fromToken(bytes memory data) internal pure returns(IERC20 token) { assembly { token := mload(add(data, 36)) } }

// Helps to avoid "Stack too deep" in swap() method function _destToken(bytes memory data) internal pure returns(IERC20 token) { assembly { token := mload(add(data, 68)) } }

1