Bro, she's still kicking it with her ex. So, you share a girl that doesn't even want to be your girl. I noticed several missteps on your part.
1. You "finally" got the number. How many times did you ask? How long did it take? You already lost here because you shouldn't have to beg for a chick's number. That makes you like a "default" type of dude in her mind. Denzel Test-if I were Denzel, would I have to wait to get her number?
2. Placing too much value on a chick whose not your girlfriend. You were doing some heavy cupcaking with a chick you had smashed a few times. She hadn't brought much to the table. She hadn't committed to you. She kept playing you to the left when it came to getting serious with you. And she told you that she was still caught up in what her ex did to her. Basically, this chick was using you for some attention and some "in the meantime" sex while her ex is ignoring her.
3. You begging this chick to be with you. First, you don't repeatedly ask someone to be with you. If someone wants to be with you, they'll jump at the chance to lock the situation down. And as a man, you made yourself look even more thirsty. Second, sounds like you're in college, which makes this even worse. You're a young male in a sea of young women and you consistently go out of your way to enter into a relationship with someone who doesn't want one with you. For shame.
4. She kept telling you that her ex still ruled her mind. Whenever a woman keeps bringing up what her ex did and how she's still so hurt over what he did to her and how that's stopping her from being with you, all she's doing is speak in Womenspeak. What's Womenspeak? It's a language that women use when their trying to tell mistruths, half truths or straight up lies. She was telling you that she still had feelings for her ex and that until she was 1000% sure that he was done with her, that she was not going to start with you.
5. You volunteered yourself for the "default n#gga" position. This is adding on Number 4. Here's what happened. Her dude was using and abusing her. She confronted him and he dipped on her because he had options. She's upset but wants him back. He comes around when he wants something i.e. sex, money, food, etc. This gives her some hope, so she keeps holding out for him but knows that he's still doing his thing. She meets you, default n#gga, who gives her all the attention the man she wants doesn't give her. You want to be with her, she wants to be with him but keeps you around all while hoping that he wants her back. And if and when he does want her back, SHE WILL DROP YOU WITH NO SECOND THOUGHT.
Learn from this and realize the game being played.
Peace