Jump to content
  • 0

One small error, just asking.


Question

Posted

L2J Freya

public static String whosVoting()
{
	for (L2PcInstance voter : L2World.getInstance().getAllPlayersArray())
	{
		if (voter.isVoting())
		{
			return voter.getName();
		}
	}
	return "None";
[color=red]	}

().getAllPlayersArray())

 

I get this error on 4 places in the code. This is one.

5 answers to this question

Recommended Posts

  • 0
Posted

What these 4 errors say?

 

I checked the method does not exist, so i try

	public Map<Integer, L2PcInstance> getAllPlayers()
{
	return _allPlayers;
}

getAllPlayers()

 

And i get

L2World.getInstance().getAllPlayers())

With error:

Can only iterate over an array or an instance of java.lang.Iterable

 

  • 0
Posted

.getAllPlayers().values())

 

Is this a good fix?

I mean i can't see other way to fix it...

If someone more expirianced then me can tell plz :D

Guest
This topic is now closed to further replies.


×
×
  • Create New...