import java.util.logging.Logger; //includes not sure if I am missing one.
import java.math.*; //includes not sure if I am missing one.
import java.util.ArrayList; //includes not sure if I am missing one.
import java.util.Comparator; //includes not sure if I am missing one.
import java.util.List; //includes not sure if I am missing one.
import org.bukkit.ChatColor; //includes not sure if I am missing one.
import org.bukkit.Location; //includes not sure if I am missing one.
import org.bukkit.command.Command; //includes not sure if I am missing one.
import org.bukkit.command.CommandSender; //includes not sure if I am missing one.
import org.bukkit.entity.EntityType; //includes not sure if I am missing one.
import org.bukkit.entity.Player; //includes not sure if I am missing one.
import org.bukkit.plugin.PluginDescriptionFile; //includes not sure if I am missing one.
import org.bukkit.plugin.java.JavaPlugin; //includes not sure if I am missing one.
//spawning a set number of a entity in MC
int SpawnAmount = 0;
else if(commandLabel.equalsIgnoreCase("SpawnWave")){
for(SpawnAmount > 0, SpawnAmount--;;){ // getting the error on this > symbol
player.getWorld().spawnCreature(location, EntityType.ZOMBIE);
}
}
代码还有更多,但其他所有工作都可以进行声明。这是用于MC插件的。我是编码新手,不便之处,敬请原谅。
最佳答案
更改
for(SpawnAmount > 0, SpawnAmount--;;)
进入
for(;SpawnAmount > 0; SpawnAmount--)
那可能就是你想要的
关于java - token “>”上的语法错误,无效的AssignmentOperator,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/21240271/