You said before that generator is not working. Did you checked the voltage on the battery while the engine is idling?
If the voltage is between 13.5 and 14.5 volts, the generator is working fine. If not, check the main battery and generator connections along with grounds. If OK then generator is bad.