Help with compass

Can you show your code so I can see if theres a problem with it?