Hello, I like some help about this code. I´m having trouble running - It´s for building a Magnetometer. I´m new in arduino programing

Welcome to the community. I realize you are new at this but you should step back and think about what you posted and what you expect the community to do.
While doing this remember:

You didn't mention:

  • what board you are using
  • What GPS
  • what magnetometer
  • How things are connected.
  • Where you found the code
  • What is causing your "trouble running" this code.