I've checked your script, and from looking at it, you seem to have used variables as if they are pointers?...
In the main function, you've supplied:
hundredyears = int(thisyear+(100-age))
And the name_errorcheck will just return the value if it is okay.
What you need to do, which infact you haven't done, is actually set the variable with the output of the function:
name = name_errorcheck(name)
I've made this mistake before, it's easy done