result=$(nc -z -v $ipaddress $port 2>&1)
if [ "$result" = "connect to ip adress port 13000 (tcp) failed: Connection refused" ]
then
cd /usr/home/game
./game
else
exit
fi
$(...)
substitutes the output of the command into the command line. And 2>&1
redirects standard error to standard output, so the error message will be captured by this.