Sounds like you may have one of the devices that will not run unless it has a working battery in it or your charger is going/gone bad. Some laptops are that way. The only way to fix those would be to replace the battery.
Now if it is the charger cord, then you would need to replace that. I would suggest trying it on another device and/or trying another devices on your laptop (if you can find ones that would work) and test to see if it is the charger cord that needs replacing or if it is the battery. Hopefully it is only one of them and not both.