If Statements with PlayerPrefs

Hello guys, I need to set game options using PlayerPrefs but i don’t know how to write if statements. I wrote an example code

#pragma strict

var playTypeString : String;

function Update () {
var text = gameObject.GetComponent(TextMesh);
text.text = playTypeString.ToString();

if(PlayerPrefs.GetString(playerType,"sphere")){
playTypeString  = "sphere";
}

if(PlayerPrefs.GetString(playerType,"stick")){
playTypeString  = "stick";
}

if(PlayerPrefs.GetString(playerType,"plus")){
playTypeString  = "plus";
}

}

But as i said i got syntax error. What can i do ?

Where are you define the playerType variable. I will a little rewrite your code:

 #pragma strict

 var playTypeString : String;

 function Update () {
  //Get from PlayerPref variable by name "playerType"
  var playerType: String = PlayerPrefs.GetString("playerType", "");
  if(playerType =="sphere") {
   playTypeString  = "sphere";
  } else if(playerType == "stick") {
   playTypeString  = "stick";
  } else if(playerType == "plus") {
   playTypeString  = "plus";
  }

  var text = gameObject.GetComponent(TextMesh);
  text.text = playTypeString.ToString();
 }

I hope that it will help you.