SharedPreferences peepsScores= PreferenceManager.getDefaultSharedPreferences(GamePlayFirst.this);
SharedPreferences.Editor editor =peepsScores.edit();
editor.putInt("userScore1", zero);
editor.putInt("userScore2", zero);
editor.putInt("userScore3", zero);
editor.putInt("userScore4", zero);
editor.putInt("userScore5", zero);
editor.putInt("userScore6", zero);
editor.putInt("userScore7", zero);
editor.putInt("userScore8", zero);
editor.commit();
SharedPreferences peepsScores = PreferenceManager.getDefaultSharedPreferences(this);
//tryed this
int userScore1 = peepsScores.getInt("userScore1","u");
//tryed this
userScore2 = peepsScores.getInt("userScore2","0");
//and tryed this
String userScore3 = peepsScores.getInt("userScore3","0");
String userScore4 = peepsScores.getInt("userScore4","0");
String userScore5 = peepsScores.getInt("userScore5","0");
String userScore6 = peepsScores.getInt("userScore6","0");
String userScore7 = peepsScores.getInt("userScore7","0");
String userScore8 = peepsScores.getInt("userScore8","0");
the getint method is underlined no matter what random things i change and then if i delete the first line of the recieving class peepScore is underlined im been on android dev webiste this website and all over google everything says its as easy as getInt what am i doing wrong
Ill try to figure out adding later i guess when i finaly get this im posting this for all newbs like me to see lol
Try this.