The code looks a little strange, are you using arudino uno, generally after the selection of development board do not add #include <SoftwareSerial.h>
Just use Arduino’s default Seial function interface