I started smoking weed when I was 16. It quickly turned into a daily habit which I kept until about a month ago.. I also drank heavily and popped my first pill at age 17. I'm 20ys old now. My memory is fucked, but not completely lost. Please, if you must smoke, do so in moderation. One joint a week is okay, but better yet limit it to even less. Think about your future, your brain is young and will adapt to the substances you use/abuse. You will develop a brain which is used to getting high, which increases the chance of you saying 'fuck it' later in life and getting addicted for real.
It's good of you to have quit the stuff, for now... I know what it's like to be told by people around you and on the internet about the potential dangers, and I know what it's like to be your age and have a pigheaded attitude. But that's not going to do any good. You don't want to watch your peers go off and get a good education while you slowly start to realise that you're paying the price for years of having fun. But good news, buddy. You will get your memory back. Give it time, study for school and don't let yourself get peer-pressured into doing anything you know deep inside is bad for you.