Мой плагин является spokeing об ошибке:я не может быть решена с переменной
Description Resource Path Location Type i cannot be resolved to a variable CommandMotdEdit.java /MotdChange/src/com/xdisteer/plugin line 76 Java Problem
код
if (args[0].equalsIgnoreCase("remove")) {
if (sender.hasPermission("motdedit.remove")) {
if (args.length >= 2) {
if (check(args[1]))
{
try {
i = Integer.parseInt(args[1]); //ERROR!!!
} catch (Exception e) { int i;
return true; }
int i;
if (i > MotdEdit.motdlist.size() - 1) {
sender.sendMessage("§cMotd with ID '" + i + "§c' does not exist!");
return true;
}
String motd = (String)MotdEdit.motdlist.get(i);
Functions.removeMotd(sender, args[1], motd, label);
return true;
}
Вы можете поместить комментарий на линии 76, чтобы мы знали, какая это линия? – Kmeixner
объявить переменную i перед ее использованием – Hiru
Вы определили или объявили где-то? –