So, I've been playing guitar for about 2 years. I often switch off between playing a steel string acoustic to an electric (No specific pattern). I'll learn a song, play it for a while and get it down perfectly. However, after I get it down, I'll play it flawlessly once or twice, then start messing up little or stupid things.

Any reason for this? I haven't a clue what to do. It makes performing extremely difficult. Thanks!
"This nightmare's gonna break me.
Please, Daylight, save me..."
If your having trouble on a few specific parts slow them down and play that single part about 20 times in a row really slow. That usually works for me. If it's random places all the time a would just slow down the whole song.
Its kinda weird that you're able to play it perfectly but starting messing it up after that.

If you keep playing do you eventually play it perfectly again?? If so, do you start messing it up again too?
For 'Ultimate Guitar' Members: I wrote an ebook called "The Ultimate Guide To Playing The Guitar".

If you'd like a FREE copy of it, you can do so by Clicking Here
Yeah, I play it perfectly more than once. Like, I'll play 1 out of every 3 attempts flawlessly. What the hell, right?
"This nightmare's gonna break me.
Please, Daylight, save me..."
Same problem as me, it's a timing issue, you may think you're tight but you're not. You need to feel the beat like literally and the guitar will basically play itself, you're playing probably doesn't sound confident. Do you use a metronome much??
Happens to everyone I think. There's a physical process in the brain where information gets shifted from conscious thought to auto-pilot. Your sub-conscious begins to automatically play the notes, but consciously you start focusing more on rhythm & dynamics etc.

It's like your going from doing one thing, playing the vanilla notes, to all of a sudden adding in a second layer of flavor (if you follow). It's only natural that you skip a few beats in the process.
ya i second the metronome comment, this will help you to force yourself to play at a pace, not the same as performing, but it is far more similar to performing than not playing with it

if you allow your brain to learn it at a slow pace perfectly first, then attempt to speed it up the muscle memory will develop properly. if you aren't playing it slowly then the muscle memory isn't developing the perfect technique. this might not technically be correct but its the general concept from what i've been told/read numerous times.

also, if your youtube name is a reflection of other interests, i find you often think you sound better than you do when partaking lol
I think maybe you could be over-estimating how fast the muscle memory is developed. I used to assume that stuff is in muscle memory once I can play it perfectly at least one time.

That was totally not the case. In fact, having just one really good session where I do everything perfect -- that's really misleading. It doesn't mean the next session will go as well, but maybe only that future sessions have a good chance of going smoother. When you really are consistent, you'll know it. The playing becomes ridiculously easy.