Code 118 on a JCB JZ140 typically indicates that there's an issue with the hydraulic pump solenoid circuit being open. This often pops up when the engine is off. If everything else seems to be functioning correctly, it's likely an electrical problem rather than an issue with the pump itself.
I'd suggest taking a look at the wiring and connectors at the solenoid to check for any loose pins, corrosion, or damage. It's also a good idea to test the solenoid coil with a multimeter, you should expect to see a few ohms. If it shows an open reading, that probably means the coil is faulty.