This site requires JavaScript, please enable it in your browser!
Greenfoot back
erdelf
erdelf wrote ...

2012/6/30

storage.csv

erdelf erdelf

2012/6/30

#
I see the storage.csv makes a cell for every player who plays with the name and then a number. But how can I access the second or third number ( bold ) erdelf,"12","0","0","0","0","0","0","0","0","0","0","","","","",""
tylers tylers

2012/6/30

#
setInt(int index,int value)
erdelf erdelf

2012/6/30

#
so to access the fifth with value 90 I write:
setInt(5,90);
tylers tylers

2012/6/30

#
no the first int (not the score one) is classed as '0' second is '1' and etc... erdelf,"12","0","0","0","0","0","0","0","0","0","0","","","","","" 0 1 2 3 4 5 6 7 8 9
UserInfo me = UserInfo.getMyInfo;
me.setInt(4,90);
me.store();
DonaldDuck DonaldDuck

2012/6/30

#
setInt(int index, int value) will set the integer at the given number with the given value, store() will store the data to the Gallery (or local file if you're offline) getInt(int index) however will return the integer at the given number (starting at 0, inclusive).
erdelf erdelf

2012/6/30

#
thx guys
You need to login to post a reply.