How to pass a variable to a function?

Sorry I must have missed where you asked to see all of my code.

I`ll work on some full test code, thanks for the help so far guys.