Is this a complex sentence she was invited to the party but she had already made other plans
No, there are two independent clauses in that sentence. Meaning that if you take out the word "but" it forms two separate sentences. Therefore, it is a compound sentence.