Other than reminding you GIGO (garbage in - garbage out): Inappropriate use of the (.*) garbage collector means that you get what you deserve.
Have a look at the tutorial in my signature as there is enough code there to get you started on your way. I don’t do coding for free but I’m more than willing to help you by correcting your code (which I’ve NOT seen) pointing out what “errors” you’ve made, why they are “errors” and how to correct them.