whats the best way to save a large list of variables?

I use UnityScript,

Ive been looking into saving game data for continuing the game where you last left off.
I would like to know what the best method is for storing data, on Windows. Im making an RPG/Hack and slash, so i have many variables

(strength, magic, defense, health, chest1 : boolean = false, what items are the in the inventory, etc)

so what is the best method for creating a “Save File” that would keep the variables and load the Saved Values of each variable when i load game?

I know there is Serialization of sorts… but there seems to be many types and i dont know which methods do what… sometimes i cant even tell if the codes are Unityscript or C#…
The other method ive found is Playerprefs, and i cant seem to get that working at all.
Lastly i know of XML… which stores a file that can be edited easily in the harddisk of the computer.

so “What is the best method in UnityScript, for saving data with large amounts of variables and what does each method actually do?”

I just cant get my head around it.

Please and thank you for your time.

I have a quite ‘light’ game in terms of data to be saved, so I just wrote a simple script that outputs the needed variables into a text file to save and reads from it to load.

#pragma strict

import System.IO;

static function autoSave() {
	var sPath : String = Application.persistentDataPath + "/savegame0.txt";
	var sData : StreamWriter = new StreamWriter(sPath);
	sData.WriteLine(encrypt(Application.loadedLevel));
	sData.WriteLine(encrypt(PlayerStatus.level));
	sData.WriteLine(encrypt(PlayerStatus.exp));
	sData.WriteLine(encrypt(PlayerStatus.plHealth));
	sData.WriteLine(encrypt(PlayerStatus.lives));
	sData.Flush();
	sData.Close();
	
	PlayerPrefs.SetString("Slot0", Application.loadedLevelName);
}

static function load(slotNmbr) {
	var lPath : String = Application.persistentDataPath + "/savegame" + slotNmbr + ".txt";
	var lData : StreamReader = new StreamReader(lPath);
	var stage = parseInt(lData.ReadLine());
	var level =  parseInt(lData.ReadLine());
	var exp =  parseInt(lData.ReadLine());
	var plHealth =  parseInt(lData.ReadLine());
	var lives = parseInt(lData.ReadLine());
	
	lData.Close();
	
	
		
	PlayerStatus.level = decrypt(level);
	PlayerStatus.expToLevel = PlayerStatus.expToLevelArr[PlayerStatus.level - 1];
	PlayerStatus.exp = decrypt(exp);
	PlayerStatus.plHealthMax = 10 * PlayerStatus.multArr[PlayerStatus.level-1];
	PlayerStatus.plHealth = decrypt(plHealth);
	PlayerStatus.lives = decrypt(lives);

		
	Application.LoadLevel(decrypt(stage));

}

I use PlayerPrefs to determine, if a certain save file exists, and what to display in the save/load menu. encrypt() and decrypt() are simple custom functions I wrote, to obscure the actual data in the save files.