public int save(){
			try {
				if(Gdx.files.local(fname).exists()){//if its already there
					FileHandle file = Gdx.files.local(fname);
					file.delete();//delete it
				}
				out = new PrintWriter(new FileWriter(fname, true));//Create a new one

				out.println(Long.toString(Space.player.laserFireRate));
				out.println(Integer.toString(Space.player.shipLvl));
				out.println(Integer.toString(Space.player.baseSpeed));
				out.println(Double.toString(Space.player.health));
				out.println(Double.toString(Space.player.healthMax));
				out.println(Double.toString(Space.player.laserDamage));
				out.println(Long.toString(Space.player.laserFireRate));

				out.println(Integer.toString(Space.player.healthCost));
				out.println(Integer.toString(Space.player.laserDamageCost));
				out.println(Integer.toString(Space.player.laserFireRateCost));
				out.println(Integer.toString(Space.player.velocityCost));

				//Fire
				out.println(Integer.toString(Space.player. fireFormLvl));
				out.println(Long.toString(Space.player.fireFormDuration));
				out.println(Integer.toString(Space.player.fireballDamage));
				out.println(Integer.toString(Space.player.fireballVelocity));
				out.println(Long.toString(Space.player.fireballFireRate));//second divided by number of projectiles per second
				out.println(Integer.toString(Space.player.fireCapacity)); // number of orbs necessary to transform

				out.println(Integer.toString(Space.player.fireFormDurationCost));//Upgrade costs
				out.println(Integer.toString(Space.player.fireballDamageCost));
				out.println(Integer.toString(Space.player.fireballFireRateCost));
				out.println(Integer.toString(Space.player.fireballVelocityCost));
				out.println(Integer.toString(Space.player.fireCapacityCost)); 

				//Lightning
				out.println(Integer.toString(Space.player.lightningFormLvl));
				out.println(Double.toString(Space.player. lightningBoltDamage));
				out.println(Integer.toString(Space.player.lightningBoltVelocity));
				out.println(Long.toString(Space.player.lightningFormDuration));
				out.println(Long.toString(Space.player.lightningBoltFireRate));
				out.println(Integer.toString(Space.player.lightningCapacity));

				out.println(Integer.toString(Space.player.lightningFormDurationCost ));
				out.println(Integer.toString(Space.player.lightningDamageCost));

				//Wind
				out.println(Integer.toString(Space.player.windFormLvl));
				out.println(Long.toString(Space.player.windFormDuration));
				out.println(Long.toString(Space.player.windBladeFireRate));
				out.println(Integer.toString(Space.player.windCapacity));
				out.println(Integer.toString(Space.player.windFormVelocityBoost));

				out.println(Integer.toString(Space.player.windFormDurationCost));
				out.println(Integer.toString(Space.player.windBladeDamageCost));
				out.println(Integer.toString(Space.player.windBladeFireRateCost));
				out.println(Integer.toString(Space.player.windFormVelocityCost));
				
				out.println(Integer.toString(Space.player.shipXp));
				out.println(Integer.toString(Space.player.fireFormXp));
				out.println(Integer.toString(Space.player.windFormXp));
				out.println(Integer.toString(Space.player.lightningFormXp));
				out.println(Integer.toString(Space.player.careerKills));

				out.println(Integer.toString(Space.player.genericOrbs));
				out.println(Integer.toString(Space.player.spendableFireOrbs));
				out.println(Integer.toString(Space.player.spendableWindOrbs));
				out.println(Integer.toString(Space.player.spendableLightningOrbs));
				out.println(Integer.toString(Space.player.fireOrbs));
				out.println(Integer.toString(Space.player.windOrbs));
				out.println(Integer.toString(Space.player.lightningOrbs));
				
				out.close();
			} 
			catch (IOException e) {
				// TODO Auto-generated catch block
				return 1;
			} //Catch for saving
			return 0;
	}