I see that old function is still alive and still in the wrong place as it was the last time you posted a question.
You still have not learned C does not support nested functions. This was pointed out in your last question. That function was pasted inside your
main
function and that is not allowed in C. You have to move it outside of the
main
function.
You also have to define a
PlayerData
structure for the function to be usable. The function accesses a
Lives
member of the structure so it should have that item in it along with any other data you want retain about the player. That is something
YOU need to do.
Here's something might help :
Data structures - C++ Tutorials[
^]