This machine showing 3100 then 31. Ive done the steps to clear and nothing is working, removed hopper and cleared and cleaned, open and closed door.
31 isn't an error -- it's likely displaying the last payout from the hopper.
3100 is an "extra coin paid out" error. Per
the list of common IGT errors, the steps to clear that error are to open and close the door. That error should not pop back up again until at least the next payout, if there's an issue with the brake on your hopper.
I see in your post that you said you opened and closed the door. What happens when you open then close the door? Do the LED displays go blank for a second or two? If they do not, that means that the machine is not sensing that the door is closed, and the error will not clear until it does sense the door is closed. Ensure that your belly door is closed and latched, and that you are closing and latching the main hatch door completely so the optics line up. If the display does not go blank for a second or two when you close the door, that indicates an issue with your machine is not seeing the door as closed, and could be an issue with your optics or the wiring leading to the optics.