"出现语法错误,AssignmentOperator 无效-6ren"> "出现语法错误,AssignmentOperator 无效-import java.util.logging.Logger; //includes not sure if I am missing one. import java.math.*; //incl-6ren">
gpt4 book ai didi

java - token ">"出现语法错误,AssignmentOperator 无效

转载 作者:行者123 更新时间:2023-12-01 23:15:45 24 4
gpt4 key购买 nike

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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com