I didn't know whether to put this is the movie forum or here, so I just chose here. I accept both the TV episode "Relics" and the later movie Generations in my personal Trek canon. Since Generations came out, I am not aware that there have any been any official explanation as to why Scotty thought it was Kirk who had come to rescue him chronologically after Kirk apparently died on the Enterprise-B. The only thing I thought up was that first of all, Scotty had a really hard time accepting Kirk's "death." Maybe that's why he gave up his dream of retiring with a boat on Earth and went on a journey far away from any reminders of Kirk in his retirement. Then maybe also the slight transporter pattern degredation effected his memories a bit when he was finally rematerialized. So has anyone come up with any retcons to explain it?