Set a tax fee on a smart contract

I want to create a smart contract bep20, and i want to set a tax fee on every transaction.

It gives me the error: Expected "(" but got identifier

function transferFrom(address from, address to, amount)
virtual override returns (bool) {

     uint256 fee = (amount.mul(percentage)).div(80000);
     uint256 total = amount.sub(fee);
     transfer (to ,total);
     return true;

can you help me? thank you

Remove the space between transfer and (to, total)

1 Like

I doubt that's gonna make any difference.

You must override _transfer function.

hope you got solution to the question?

May be helpful if more code portion is posted.