They got huge loans from the ecb because they don't have their own central bank. Borrowing from your own central bank isn't really borrowing at all. Borrowing from one largely underwritten by a larger neighbour leaves you in thrall to a larger neighbour.
Those loans didn't "cause" Greece's problems. But they were a manifestation of the obvious truth that Greece didn't have at its disposal one of the most crucial economic policy levers, control over its money.
If Scotland doesn't have an economic crisis then it might not need control over monetary policy as urgently as Greece did. But crises are an inherent feature of capitalism. Something dramatic like going independent could easily trigger one.
One of the best arguments for independence is that Scotland's (well, northern Britain's really) economy is out of step with the South's and UK's monetary policy is detrimental. I think it was Eddie George who said that unemployment in the north was a price worth paying for low inflation in the south. With a joint currency, that potential gain from independence is lost.
I say again, fiscal autonomy without monetary autonomy is not independence in any meaningful sense. I'd go as far as saying it's lunacy.