Still need help
|
Hey in fileManager.java when you make a new thing to save, you have to put something like
And I wanted to know what theCode:else if (line.startsWith("FamiliarType:")) { p.FamiliarType = Integer.parseInt(line.substring(13)); }
means? Because I have some stuff I want to add in there but I dont know what number I would use there. I will rep if you help thanks.Code:Integer.parseInt(line.substring(NUMBER));
Still need help
SOMEONE here has to know what it is.
It's basically for saving stuff like player rights, killcount points, etc
That meansInteger.parseInt(line.substring(NUMBER));
you see, the "FamiliarType:" is a total of 13 words, so you count it up and add the #13(line.startsWith("FamiliarType:"))
here:
So if the code isInteger.parseInt(line.substring(13));
else if (line.startsWith("Buttseks:")) {
it would be
so the whole code would look like thisInteger.parseInt(line.substring(9));
sorry if I cant explain properly i suck at explainingelse if (line.startsWith("Buttseks:")) {
p.Buttseks = Integer.parseInt(line.substring(9));
}
But if you still dont get it, i'll try to explain better
It's the amount of letters/numbers it ignores before 'loading' whatever it is you're trying to load.
As you can see, FamiliarType: is 12 letters and 1 :, so it ignores the first 13 characters then loads whatever is next (which is the FamiliarType variable).
I get it. Thanks guys for actually answering repped
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |