Help with some code please?

Discussion in 'Plugin Development' started by Agental19, Aug 5, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Agental19

    First error. ---> localItemStack8 = (arrayOfPlayer = Bukkit.getServer().getOnlinePlayers()).length;
    for (ItemStack localItemStack5 = 0; localItemStack5 < localItemStack8; localItemStack5++)
    {
    Player online = arrayOfPlayer[localItemStack5];
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    Bold (for error location)
     
  2. Agental19 Two things: One errors are only helpful if you tell us what they are. Two, getOnlinePlayers returns a Collection now, not an array
     
  3. Agental19 Here's what I'm gathering from this:
    You can't compare an ItemStack to an integer. Saying ItemStack localItemStack5 = 0; throws an error because you are trying to set an ItemStack variable's value to an integer.
    I may be wrong, but that's what I'm getting from the code =P
     
Thread Status:
Not open for further replies.

Share This Page