Void Value no Ignored as it ought to be

The error message is telling you that you are trying to obtain a value from a function that does not return a value.

Since the program posted won't run as it is, it doesn't help.