Nothing wrong with flat roofs.
As with any building element, if done properly and maintained they’ll last for decades.
Lots of different systems around with varying levels of cost.
Any roof is prone to leaking so look at the element as a whole (chimney, flashings, roof covering).
It could well be possible that the roof has been neglected and has come to the end of it’s life. It sounds like getting out onto the roof would be of benefit if you are genuinely interested in the property.
Alternatively, it could be damp coming down the chimney and nothing to do with the roof.
Contrary to ‘web banter’ flat roofs do offer some advantages over pitched roofs. When done properly can last for decades.