private void commenceTrade()
    {
    	try
    	{
    		if(host)
    		{
    			Pokemon temp=new Pokemon(Pokemon.Species.BULBASAUR);
    			
    			//Strings
    			temp.species=Pokemon.Species.valueOf(inTacular.readUTF());
				outTacular.writeUTF(""+JokemonDriver.partyPokemon[JokemonDriver.offerIndex].species);
				outTacular.flush();
				temp.nickname=inTacular.readUTF();
				outTacular.writeUTF(""+JokemonDriver.partyPokemon[JokemonDriver.offerIndex].nickname);
				outTacular.flush();
				temp.originalTrainer=inTacular.readUTF();
				outTacular.writeUTF(""+JokemonDriver.partyPokemon[JokemonDriver.offerIndex].originalTrainer);
				outTacular.flush();
				temp.status=Pokemon.Status.valueOf(inTacular.readUTF());
				outTacular.writeUTF(""+JokemonDriver.partyPokemon[JokemonDriver.offerIndex].status);
				outTacular.flush();
				temp.substatus=Pokemon.Substatus.valueOf(inTacular.readUTF());
				outTacular.writeUTF(""+JokemonDriver.partyPokemon[JokemonDriver.offerIndex].substatus);
				outTacular.flush();
				temp.move[0]=Pokemon.Move.valueOf(inTacular.readUTF());
				outTacular.writeUTF(""+JokemonDriver.partyPokemon[JokemonDriver.offerIndex].move[0]);
				outTacular.flush();
				temp.move[1]=Pokemon.Move.valueOf(inTacular.readUTF());
				outTacular.writeUTF(""+JokemonDriver.partyPokemon[JokemonDriver.offerIndex].move[1]);
				outTacular.flush();
				temp.move[2]=Pokemon.Move.valueOf(inTacular.readUTF());
				outTacular.writeUTF(""+JokemonDriver.partyPokemon[JokemonDriver.offerIndex].move[2]);
				outTacular.flush();
				temp.move[3]=Pokemon.Move.valueOf(inTacular.readUTF());
				outTacular.writeUTF(""+JokemonDriver.partyPokemon[JokemonDriver.offerIndex].move[3]);
				outTacular.flush();

				//Integers
				temp.level=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].level));
				outTacular.flush();
				temp.exp=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].exp));
				outTacular.flush();
				temp.health=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].health));
				outTacular.flush();
				temp.healthMax=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].healthMax));
				outTacular.flush();
				temp.HP_EV=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].HP_EV));
				outTacular.flush();
				temp.ATK_EV=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].ATK_EV));
				outTacular.flush();
				temp.DEF_EV=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].DEF_EV));
				outTacular.flush();
				temp.SPCL_EV=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].SPCL_EV));
				outTacular.flush();
				temp.SPEED_EV=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].SPEED_EV));
				outTacular.flush();
				temp.HP_IV=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].HP_IV));
				outTacular.flush();
				temp.ATK_IV=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].ATK_IV));
				outTacular.flush();
				temp.DEF_IV=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].DEF_IV));
				outTacular.flush();
				temp.SPCL_IV=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].SPCL_IV));
				outTacular.flush();
				temp.SPEED_IV=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].SPEED_IV));
				outTacular.flush();
				temp.TRUE_PP[0]=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PP[0]));
				outTacular.flush();
				temp.TRUE_PP[1]=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PP[1]));
				outTacular.flush();
				temp.TRUE_PP[2]=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PP[2]));
				outTacular.flush();
				temp.TRUE_PP[3]=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PP[3]));
				outTacular.flush();
				temp.TRUE_PPMAX[0]=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PPMAX[0]));
				outTacular.flush();
				temp.TRUE_PPMAX[1]=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PPMAX[1]));
				outTacular.flush();
				temp.TRUE_PPMAX[2]=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PPMAX[2]));
				outTacular.flush();
				temp.TRUE_PPMAX[3]=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PPMAX[3]));
				outTacular.flush();
				
				//Booleans
				outTacular.writeUTF(""+JokemonDriver.partyPokemon[JokemonDriver.offerIndex].IS_TRADED);
				outTacular.flush();
				temp.IS_TRADED=Boolean.parseBoolean(inTacular.readUTF());

				JokemonDriver.partyPokemon[JokemonDriver.offerIndex]=new  Pokemon(temp.species, temp.move[0], temp.move[1], temp.move[2], temp.move[3], temp.level,
				temp.HP_IV,  temp.ATK_IV, temp.DEF_IV, temp.SPCL_IV, temp.SPEED_IV,
				temp.nickname, temp.status, temp.idNumber, temp.originalTrainer);
				
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].setEV("HP",temp.HP_EV);
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].setEV("ATK",temp.ATK_EV);
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].setEV("DEF",temp.DEF_EV);
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].setEV("SPCL",temp.SPCL_EV);
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].setEV("SPEED",temp.SPEED_EV);

				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].health=temp.health;
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].healthMax=temp.healthMax;
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].exp=temp.exp;

				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PP[0]=temp.TRUE_PP[0];
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PP[1]=temp.TRUE_PP[1];
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PP[2]=temp.TRUE_PP[2];
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PP[3]=temp.TRUE_PP[3];

				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PPMAX[0]=temp.TRUE_PPMAX[0];
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PPMAX[1]=temp.TRUE_PPMAX[1];
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PPMAX[2]=temp.TRUE_PPMAX[2];
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PPMAX[3]=temp.TRUE_PPMAX[3];
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].IS_TRADED=true;
    		}
    		else
    		{
    			Pokemon temp=new Pokemon(Pokemon.Species.BULBASAUR);
    			
    			//Strings
				outTacular.writeUTF(""+JokemonDriver.partyPokemon[JokemonDriver.offerIndex].species);
				outTacular.flush();
				temp.species=Pokemon.Species.valueOf(inTacular.readUTF());
				outTacular.writeUTF(""+JokemonDriver.partyPokemon[JokemonDriver.offerIndex].nickname);
				outTacular.flush();
				temp.nickname=inTacular.readUTF();
				outTacular.writeUTF(""+JokemonDriver.partyPokemon[JokemonDriver.offerIndex].originalTrainer);
				outTacular.flush();
				temp.originalTrainer=inTacular.readUTF();
				outTacular.writeUTF(""+JokemonDriver.partyPokemon[JokemonDriver.offerIndex].status);
				outTacular.flush();
				temp.status=Pokemon.Status.valueOf(inTacular.readUTF());
				outTacular.writeUTF(""+JokemonDriver.partyPokemon[JokemonDriver.offerIndex].substatus);
				outTacular.flush();
				temp.substatus=Pokemon.Substatus.valueOf(inTacular.readUTF());
				outTacular.writeUTF(""+JokemonDriver.partyPokemon[JokemonDriver.offerIndex].move[0]);
				outTacular.flush();
				temp.move[0]=Pokemon.Move.valueOf(inTacular.readUTF());
				outTacular.writeUTF(""+JokemonDriver.partyPokemon[JokemonDriver.offerIndex].move[1]);
				outTacular.flush();
				temp.move[1]=Pokemon.Move.valueOf(inTacular.readUTF());
				outTacular.writeUTF(""+JokemonDriver.partyPokemon[JokemonDriver.offerIndex].move[2]);
				outTacular.flush();
				temp.move[2]=Pokemon.Move.valueOf(inTacular.readUTF());
				outTacular.writeUTF(""+JokemonDriver.partyPokemon[JokemonDriver.offerIndex].move[3]);
				outTacular.flush();
				temp.move[3]=Pokemon.Move.valueOf(inTacular.readUTF());

				//Integers
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].level));
				outTacular.flush();
				temp.level=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].exp));
				outTacular.flush();
				temp.exp=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].health));
				outTacular.flush();
				temp.health=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].healthMax));
				outTacular.flush();
				temp.healthMax=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].HP_EV));
				outTacular.flush();
				temp.HP_EV=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].ATK_EV));
				outTacular.flush();
				temp.ATK_EV=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].DEF_EV));
				outTacular.flush();
				temp.DEF_EV=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].SPCL_EV));
				outTacular.flush();
				temp.SPCL_EV=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].SPEED_EV));
				outTacular.flush();
				temp.SPEED_EV=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].HP_IV));
				outTacular.flush();
				temp.HP_IV=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].ATK_IV));
				outTacular.flush();
				temp.ATK_IV=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].DEF_IV));
				outTacular.flush();
				temp.DEF_IV=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].SPCL_IV));
				outTacular.flush();
				temp.SPCL_IV=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].SPEED_IV));
				outTacular.flush();
				temp.SPEED_IV=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PP[0]));
				outTacular.flush();
				temp.TRUE_PP[0]=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PP[1]));
				outTacular.flush();
				temp.TRUE_PP[1]=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PP[2]));
				outTacular.flush();
				temp.TRUE_PP[2]=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PP[3]));
				outTacular.flush();
				temp.TRUE_PP[3]=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PPMAX[0]));
				outTacular.flush();
				temp.TRUE_PPMAX[0]=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PPMAX[1]));
				outTacular.flush();
				temp.TRUE_PPMAX[1]=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PPMAX[2]));
				outTacular.flush();
				temp.TRUE_PPMAX[2]=Integer.parseInt(inTacular.readUTF(),2);
				outTacular.writeUTF(Integer.toBinaryString(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PPMAX[3]));
				outTacular.flush();
				temp.TRUE_PPMAX[3]=Integer.parseInt(inTacular.readUTF(),2);
				
				//Booleans
				outTacular.writeUTF(""+JokemonDriver.partyPokemon[JokemonDriver.offerIndex].IS_TRADED);
				outTacular.flush();
				temp.IS_TRADED=Boolean.parseBoolean(inTacular.readUTF());

				JokemonDriver.partyPokemon[JokemonDriver.offerIndex]=new  Pokemon(temp.species, temp.move[0], temp.move[1], temp.move[2], temp.move[3], temp.level,
				temp.HP_IV,  temp.ATK_IV, temp.DEF_IV, temp.SPCL_IV, temp.SPEED_IV,
				temp.nickname, temp.status, temp.idNumber, temp.originalTrainer);
				
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].setEV("HP",temp.HP_EV);
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].setEV("ATK",temp.ATK_EV);
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].setEV("DEF",temp.DEF_EV);
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].setEV("SPCL",temp.SPCL_EV);
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].setEV("SPEED",temp.SPEED_EV);

				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].health=temp.health;
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].healthMax=temp.healthMax;
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].exp=temp.exp;

				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PP[0]=temp.TRUE_PP[0];
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PP[1]=temp.TRUE_PP[1];
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PP[2]=temp.TRUE_PP[2];
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PP[3]=temp.TRUE_PP[3];

				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PPMAX[0]=temp.TRUE_PPMAX[0];
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PPMAX[1]=temp.TRUE_PPMAX[1];
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PPMAX[2]=temp.TRUE_PPMAX[2];
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].TRUE_PPMAX[3]=temp.TRUE_PPMAX[3];
				JokemonDriver.partyPokemon[JokemonDriver.offerIndex].IS_TRADED=true;
    		}
    	}
    	catch(Exception e)
    	{
    		e.printStackTrace();
    		JokemonDriver.save();
    		System.exit(0);
    	}
    		
    	JokemonDriver.tradeConfirm=false;
    	JokemonDriver.friendTradeConfirm=false;
    	Pokedex.seen(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].pokedexNumber-1);
    	Pokedex.caught(JokemonDriver.partyPokemon[JokemonDriver.offerIndex].pokedexNumber-1);
    	JokemonDriver.save();
    }