What should you do if a guy is really sweet to you sometimes but other times acts like you don't exist and is very rude to you?

Men do this, they feel embarrassed especially around their mates, they don't want to be all lovey dovey so they act out, but you shouldn't take it. Say to him that you like him and he's really sweet but there are times when you feel upset by his behaviour, tell him to either show you respect or move on, if he chooses you then he really is as sweet as he behaves and if not then he's not the kind of guy you'd want around anyway. No man or woman should be rude to you! He sounds like he is either a type of abuser or he has some psychological problems. Don't put up with his behavior and try having a talk with him and tell him you aren't putting up with the rude way he treats you. Give him a chance to explain and if he should have an excuse tell him you're there to talk too, but you won't put up with his rudeness!