Hi @vacpyt Welcome to the Candy Crush Friends Community.
How many lives are being taken? Once you start a level you will use up 1 of your lives whether you fully play the level or quit right away without even making a move. Can you give more information on what you mean by no more moves are available?
That means what you have gathered that level for a quest will be lost since you did not beat the level and is offering you the chance to keep playing to try to beat the level so you keep what was gathered. If you choose to purchases extra moves and still do not complete the level you still will not get what you have gathered.
The life being taken is the life you are using for playing the level and not an additional one. So if you purchase the extra moves and complete the level you will not lose that life since you beat the level.
In short to keep what you gather during a level and not use up a life you must beat the level.