Programming help newb counter

Tried what you said, no luck

Luck plays no part in programming. Skill is FAR more important.

One necessary skill is being able to describe what that code actually does, and how that differs from what you want. You need to work on acquiring that skill.