function restoreArrays(save, order) {
strOrder = ui.getStringWidth(order)/6; i = save.split(",").length;
variable = []; for (ii = 0; i/strOrder > ii; ii++) {k = 0; variable [ii] = []; 
for (j = 0; order [j] != undefined; j++) {if (order [j] == "e" || order [j] == "z") {variable [ii] [j-k] = [];
for (j = j; order [j] != undefined && (order [j] == "e" || order [j] == "z"); j++) {k += 1;}}}} ii = 0;
for (i = 0; order [i] != undefined; i++) {if (order [i] == "o" || order [i] == "s") 
{for (j = i; save.split(",") [j] != undefined; j += strOrder)
{if (order [i] == "o") {variable [Math.floor(j/strOrder)] [i-ii] = parseFloat(save.split(",") [j]);}
if (order [i] == "s") {variable [Math.floor(j/strOrder)] [i-ii] = save.split(",") [j];
if (parseFloat(variable [Math.floor(j/strOrder)] [i-ii]) == 0) {variable [Math.floor(j/strOrder)] [i-ii] = "";} 
if (variable [Math.floor(j/strOrder)] [i-ii] == "false") {variable [Math.floor(j/strOrder)] [i-ii] = false;} 
if (variable [Math.floor(j/strOrder)] [i-ii] == "true") {variable [Math.floor(j/strOrder)] [i-ii] = true;}}}}
else {for (ii = 0; order [i+ii] == "e" || order [i+ii] == "z"; ii++)
{for (j = i+ii; save.split(",") [j] != undefined; j += strOrder)
{if (order [i] == "e") {variable [Math.floor(j/strOrder)] [i] [ii] = parseFloat(save.split(",") [j]);}
if (order [i] == "z") {variable [Math.floor(j/strOrder)] [i] [ii] = save.split(",") [j];}}} i+=ii-1; ii--;}}
return variable;}

skillVar = restoreArrays(skillSave, skillOrder);
superGarden = restoreArrays(gardSave, gardOrder);
fireArray = restoreArrays(fireSave, fireOrder);
shop1 = restoreArrays(shop1Save, shopOrder);
torchArray = restoreArrays(torchSave, torchOrder);
cactusArray = restoreArrays(cactusSave, cactusOrder);
repairArray = restoreArrays(repairSave, repairOrder);
entities = restoreArrays(entitySave, entityOrder);
for (i = 0; entities [i] != undefined; i++) {
	entities [i] [1] = 1;
}

achievSet = []; 
for (i = 0; achievSave.split(",") [i] != undefined; i++) {achievSet [i] = parseFloat(achievSave.split(",") [i]);}

actArray = [0, 0, 0, 0]; 
for (i = 0; actSave.split(",") [i] != undefined; i++) {actArray [i] = parseFloat(actSave.split(",") [i]);}

shop1Var = [0, 0, 0, 0, 0, 0, 0, 0]; 
for (i = 0; shop1Sav.split(",") [i] != undefined; i++) {shop1Var [i] = parseFloat(shop1Sav.split(",") [i]);}

j = ui.getStringWidth(blockOrder)/6; Asave = blockSave.split(","); k = Asave.length;
blockArray = []; for (ii = 0; k/j > ii; ii++) 
{blockArray [Asave [j*ii]] = [Asave [j*ii], Asave [j*ii+1], Asave [j*ii+2], Asave [j*ii+3]];}

messageVal = []; 
for (i = 0; messageSave.split(",") [i] != undefined; i++) {messageVal [i] = messageSave.split(",") [i];
if (messageVal [i] == "false") {messageVal [i] = false;} if (messageVal [i] == "true") {messageVal [i] = true;}}

dialogueChoice = []; 
dialogueChoice [0] = dialogueSave.split(",") [0]; dialogueChoice [1] = parseFloat(dialogueSave.split(",") [1]);
dialogueChoice [2] = parseFloat(dialogueSave.split(",") [2]);
if (dialogueChoice [0] == "false") {dialogueChoice [0] = false;} 
if (dialogueChoice [0] == "true") {dialogueChoice [0] = true;}

function saveArrays() 
{skillSave = "" + skillVar; gardSave = "" + superGarden; fireSave = "" + fireArray; actSave = "" + actArray; 
shop1Save = "" + shop1; shop1Sav = "" + shop1Var; torchSave = "" + torchArray; cactusSave = "" + cactusArray;
repairSave = "" + repairArray; messageSave = "" + messageVal; dialogueSave = "" + dialogueChoice;
achievSave = "" + achievSet; entitySave = "" + entities;}