transformers movie 27 rotf

hey every body this is my first post and i don't get on much i hope you will forgive any discrepancies.
Now i was thinking in ROTF the fallen tells megatron that only a prime can kill prime.
And then megatron goes to earth and kills optimus.so that would imply that eather prime was not dead or megatron was a prime.or most likely just a script error.
Also does any body got any idea where primes cannons come frome
Now i was thinking in ROTF the fallen tells megatron that only a prime can kill prime.
And then megatron goes to earth and kills optimus.so that would imply that eather prime was not dead or megatron was a prime.or most likely just a script error.
Also does any body got any idea where primes cannons come frome