Help with custom ERC20 smart contract

i have develop a token, i dont know why the transfer functionality is not working. i can not transfer token to another address.

here is the code:

`Preformatted text

This doesn’t look like a simple token, it looks like a smart contract code source from a validated smart contract.

yes this is my token, but what did i do wrong?

yes its my token, where is the error?why this revert error?

Do you have the exact error that the smart contract generates on execution? Is this smart contract deployed somewhere?

it not deployed, originally there was on wallet, then we( yomoo) from your team help me to add another wallet that takes fees. its deployed fine on testnet, but transfer, balanceof, these functions not working.

if i try to transfer the token it says gas estimation error & on the terminal( remix) it shows the error
( execution reverted).

This doesn’t look like valid Solidity code for me:

My bad…plz check now.

This looks like a normal transfer function:

so the is the error ? can we resolve this?

I don’t know where is the error, this doesn’t look like something trivial to me. You’ll have to understand what that smart contract code does and identify where is the problem. This doesn’t look like a simple smart contract either.

whats the solution: i told you the error? can you solve it? can you give it a go on remix?

I don’t know what is the solution.

ok thank you for your time.

can you solve this error?
CompilerError: Stack too deep, try removing local variables.
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tLiquidity, tCharityFee,tMarketingFee, _getRate());

@iammoud2 this is a complicated smart contract that we cannot help you with

perhaps you can help you in this: i have change the contract, transfer is working well just this error now.

CompilerError: Stack too deep, try removing local variables.

stack too deep is probably cause you have too many objects in a struct/ array, you need to split things up.

That i know, could not able to do it. Can you help?