#1
hey i started playing guitar a year ago when i got an acoustic as a gift and i got an electric six months ago too. since then ive taught myself and been practicing for at least an hour most days and at this point i can play easy songs like stairway to heaven perfectly and i can play intermediate songs like paradise city really well too and i can even play hard songs like certain van halen or master of puppets a little sloppy in parts but still decent overall. however, when i try to create my own solos i cant create anything longer than like 45 seconds that still sounds decent and original and even to make a decent half minute solo takes me hours and hours of messing around and putting together riffs and short runs. Im not able to improvise to save my life or get a good run going for awhile. ive learned all the basic scales like the pentatonic, minor, major blues etc. and the only things i can think of that i havent learned so far are theory beyond the basics, modes intervals and tapping so is there a reason why i still cant improvise at all? also i cant memorize and play without looking at a tab songs that are at all complex or not simple, is that just a memory thing that will eventually come to me?
#2
I'd say try learning a style that's improv-heavy, like jazz, and that should at least help. Jazz is totally free-flowing and the best jazz players in the world improvise about 2/3 of everything they play. I think the quote goes like this:

"If you play one wrong note, it's a mistake. If you play two wrong notes, it's jazz." - Miles Davis

And you can also just think about playing fragments of any of the scales you know, think of the first couple bars and while you're playing them think of the next few, which is basically all Slash ever does on one scale.
Studies have shown that 92% of guitar players are close-minded. Copy this into your signature if you're part of the 8% who enjoy rap.