Alright.
String var59 = var49.next((String)null);
String count = var59;
if (var59 != null && var59.startsWith("F")) {
var59 = var59.substring(1);
count = var49.next((String)null);
}
if (count != null && count.startsWith("C")) {
count = count.substring(1);
}
...becomes...
boolean hasFormation = false;
boolean hasAttackCount = false;
String var59 = var49.next((String)null);
String count = var59;
if (var59 != null && var59.startsWith("F")) {
hasFormation = true;
var59 = var59.substring(1);
count = var49.next((String)null);
}
if (count != null && count.startsWith("C")) {
hasAttackCount = true;
count = count.substring(1);
}
...and...
if (var59 != null) {
var43.formation = Integer.parseInt(var59);
}
if (count != null) {
var43.gattackcounter = Integer.parseInt(count);
}
...becomes...
if (hasFormation) {
var43.formation = Integer.parseInt(var59);
}
if (hasAttackCount) {
var43.gattackcounter = Integer.parseInt(count);
}
![Cheers ]cheers[](https://www.sas1946.com/main/Smileys/akyhne/occasion14.gif)
Mike
String string_10_ = numbertokenizer.next((String) null);
if (string_10_ != null && string_10_.startsWith("F")) {
String string_11_ = string_10_.substring(1);
waypoint.formation = Integer.parseInt(string_11_);
}
if (string_10_ != null && string_10_.startsWith("C")) {
String string_11_ = string_10_.substring(1);
waypoint.gattackcounter = Integer.parseInt(string_11_);
}
Do you need to share here too? Although there is no error.