Stewie Posted January 12, 2013 Share Posted January 12, 2013 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. Link to comment Share on other sites More sharing options...
0 Pauler Posted January 12, 2013 Share Posted January 12, 2013 What these 4 errors say? Link to comment Share on other sites More sharing options...
0 Stewie Posted January 12, 2013 Author Share Posted January 12, 2013 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 Link to comment Share on other sites More sharing options...
0 Stewie Posted January 12, 2013 Author Share Posted January 12, 2013 .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 Link to comment Share on other sites More sharing options...
0 Stewie Posted January 12, 2013 Author Share Posted January 12, 2013 What these 4 errors say? Solved via teamviewer +1 karma, thanks. Link to comment Share on other sites More sharing options...
0 Pauler Posted January 12, 2013 Share Posted January 12, 2013 Solved via teamviewer +1 karma, thanks. Thanks. Link to comment Share on other sites More sharing options...
Question
Stewie
L2J Freya
().getAllPlayersArray())
I get this error on 4 places in the code. This is one.
Link to comment
Share on other sites
5 answers to this question
Recommended Posts