What is the role of り in 行けなかったり

I found this word (行けなかったり) in one of the ペンパル collection. The google translator doesn’t translate it properly. So, I would be pleased if someone could explain it to me.
I have seen なかった meaning… not being able to do something in the past, like, I promised I would visit you yesterday, but I couldn’t(行けなかった). But I had never seen the り ending. The whole text:

こんにちは。子供のころ、雪が50cm位降った年がありました。その時は、雪だるまを作ったり、雪かきをしたり、とても楽しかった思い出があります。でも、アメリカに住んでいた時、毎日毎日雪が降って、買い物に行けなかったり、学校に行く途中に転んだり、停電になったり、嫌な思いばかりしました。だから、私は雪は怖いです。

This text also have 作ったり and なったり. What I want so ask is:
The り has the same role in the 3 cases?
What’s the function/meaning of the り in these cases?

りjust lets you know that this action is one of a series, and implies that you did many things, even more than the ones mentioned, sort of like, “when the snow fell we built snowmen, we shoveled the snow”, and other things (left unsaid)…

The actual verb ending here is たり, but it is formed in the same way as the normal past た ending + り. It doesn’t have anything to do with the past tense, and needs to be followed by する. As Steve says, it’s used for listing actions, and the list does not have to be exhaustive. It can even be used with just one verb.

人が行ったり来たりしていた。
People were coming and going.
図書館で勉強したりする。
At the library I study, among other things

It differs from the て form as in that case the relationship between the actions is much stronger. In your example, the writer is listing the sort of things that happened at some time when it snowed. If they were joined with て then it sounds as though they all happened at once, or one after the other.

SteveさんとRoanさんのおかげで、このポイントは明らかになりました。
返事していただきありがとうございます。