Jump to content
  • 0

Hashmap Error


L2shaken

Question

http://imgur.com/a/KJwdY

protected int getVoteWinner()
	{
		int old = 0;
		HashMap<Integer, Integer> temp = new HashMap<>();
		
		for (int vote : votes.values())
		{
			if (!temp.containsKey(vote))
				temp.put(vote, 1);
			else
			{
				old = temp.get(vote);
				old++;
				temp.getEntry(vote).setValue(old);
			}
		}
		
		int max = temp.head().getNext().getValue();
		int result = temp.head().getNext().getKey();
		
		for (Map.Entry<Integer, Integer> entry : temp.entrySet())
		{
			if (entry.getValue() > max)
			{
				max = entry.getValue();
				result = entry.getKey();
			}
		}
		
		votes.clear();
		temp = null;
		return result;
	}

How do I solve this problem? Use aCis 350, replaces FastMap with HashMap and is giving this error.

Edited by L2shaken
Link to comment
Share on other sites

Recommended Posts

  • 0

JpEK-fxuapvw1908473.gif

Thank you Sir SweeTs

 

As you see dear topic owner, if you're going to make a server you must put some effort and learn the basics. Asking for help when your knowledge is 0 along with free packs in order to make money saying that "the reason i make it is not money is just my dream" it's fail. 

Edited by AccessDenied
Link to comment
Share on other sites

  • 0

Since when did this forum turn into a circlejerk? This is a help section and people can ask whatever the hell they want, they are not here to be judged.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • Alex is trustable.   Fast and reliable, you can trust him even without middleman. Cheers!
    • now admin not add it for this servers 🙂 all working good And not more servers block skillgrp, block max user.ini (wh) or interface... but still exist bypass for this files 😉
    • WTS Script for L2Helper AutoBishop: Script button bind in Configuration File. Enabled state: Smart use Heal/Cleanse/Res/Noblesse/Purify on party. Smart use Burn/MBF/BlockBuffs/Trance on enemies. Priority at Healing functions. OnScreen On/Off states. Contact: PM or https://discordapp.com/users/248492698816741377/
    • - High quality and strong VERIFIED Business Manager ready to use.  
    • Welcome to Classic-Interlude Network Dear players ! We will describe you now our Exodus Server! Our project runs on L2OFF PTS Files based on interlude gameplay but with modern client witch offer a hight quality grafics and feautures!All being said lets show you what we got! WEBSITE : https://classic-interlude.com/ DISCORD : https://discord.gg/gBUdDPufwE Rates: EXP/SP-x25 Adena ammount -x10 Drop chance -x7 Spoil chance -x7 Quest item ammount - x1 Features: GM-SHOP (Until B-Grade) Buffer NPC (No ressist's, 1/2 Class Buff's only, 1H Buff Duration Class Manager (Shadow Weapon's Coupon's 1/2 Class) (3rd Class 700 Halisha Mark's) Gatekeeper Service Manager Mammon NO AUTOFARM All Epic's LVL 80 Antibuff Shield Buff's Limit 22+4 Auto Learn Skill's Custom Subclass System (Cabrio/Hallate/Kernon/Golkonda)   Game Command's .menu - Brings you the Menu window .varmor - Brings you the Costume window .offlinebuffshop - Allow you to sell buffs offline .exp on /.exp off - On/Off Your Experience Monsters Drop/Spoil Info - Shift+click on mob Remove your buff - ALT+click on Buff Offline Shop - Set up your shop and log out .vip Comand - available from level 1 vip Boosted Quest's The Finest Food LeafOfFlavaAmount 3 AntelopeHornAmount 3 BuffaloMeatAmount 3 Heart in Search of Power BeadOfObedienceAmount 3 Exploration of Giants Cave, Part 1 AncientParchmentAmount 3 Exploration of Giants Cave, Part 2 AncientTitanBookAmount 3 Supplier of Reagents RottenBonePieceAmount 3 QuicksilverAmount 3 ReagentPouchAmount 3 VolcanicAshAmount 3 ReagentPouchAmount 3 DemonsBloodAmount 3 MoonStoneShardAmount 3 ReagentBoxAmount 3 WyrmBloodAmount 3 LavaStoneAmount 3 ReagentPouchAmont 3 War with Ketra Orcs MolarOfKetraOrcAmount 3 War with Varka Silenos VarkasManeAmount 3 Alliance with Ketra Orcs VarkaBadgeSoldierAmount 3 VarkaBadgeCaptainAmount 3 VarkaBadgeGeneralAmount 3 Alliance with Varka Silenos KetraBadgeSoldierAmount 3 KetraBadgeCaptainAmount 3 KetraBadgeGeneralAmount 3 Relics of the Old Empire BrokenRelicAmount 3 Gather the Flames TorchAmount 3 The Finest Ingredients - Part 1 TrunkNepentheAmount 3 FootBanderAmount 3 SecretSpiceAmount 3     Whisper Of Dreams - Part 1 CaveBeastToothAmount 3 DeathWaveLightAmount 3 MysteriousStoneAmount 1 Whisper Of Dreams - Part 2 KarikHornAmount 3 CaveHowlerSkullAmount 3 Legacy of Insolence RedPapyrusAmount 3 BluePapyrusAnount 3 BlackPapyrusAmount 3 WhitePapyrusAmount 3 In Search of Fragments of Dimension DimensionalFragmentMultiply 3 An Ice Merchant's Dream SilverIceCrystalAmount 3 Protect the Water Source PlagueDustAmount 3 Guardians of the Holy Grail MonkScriptureAmount 3 Seekers of the Holy Grail PaganTotemAmount 3 Rise and Fall of the Elroki Tribe BonePlainDinosaurAmount 3 Yoke of the Past ScrollAncientMagicAmount 3 Clean up the Swamp of Screams TalonStakatoAmount 3 A Powerful Primeval Creature DinosaurTissueAmount 3 DinosaurEggAmount 3 Delicious Top Choice Meat TopQualityMeatAmount 3 The Zero Hour FangStakatoAmount 3 Hunt of the Golden Ram Mercenary Force SplinterChitinAmount 3 NeedleChitinAmount 3   First things that will open after server start is : Sieges -First Castel Will Be Gludio fallowed by Dion,Giran,Oren,Aden,Innadril,Goddard,Rune and Schuttgart with a 2weeks gap between sieges Sevensings - will be avaible after 1 week of server Grand opening seal stones drops are x3 Olympiad - will be avaible after 3 weeks of server opening and max enchant is +8 for weapons and +6 for armors/jewels Donation We DO NOT accept donations for : Adena/Ancient Adena/Weapons/Armors/jowles/Enchants/Epics/Skills/Hero/Castels/etc the only thing you will recive from donation are Donate Coins, with them you can buy the fallowing things in game :   ViP Status Vip Lvl 1 - +3% ExP/Sp/Adena/Spoil/Drop, unlocks .vip command (Global gk/buffer/class master/dressme), World Chat shouts 5 extra times per day(Symbol &) Vip Lvl 2 - +5% ExP/Sp/Adena/Spoil/Drop, unlocks .vip command (Global gk/buffer/class master/dressme), World Chat shouts 10 extra times per day(Symbol &) Vip Lvl 3 - +10% ExP/Sp/Adena/Spoil/Drop, unlocks .vip command (Global gk/buffer/class master/dressme), World Chat shouts 15 extra times per day(Symbol &) Vip Lvl 4 - +15% ExP/Sp/Adena/Spoil/Drop, unlocks .vip command (Global gk/buffer/class master/dressme), World Chat shouts 20 extra times per day(Symbol &) Vip Lvl 5 - +20% ExP/Sp/Adena/Spoil/Drop, unlocks .vip command (Global gk/buffer/class master/dressme), World Chat shouts 25 extra times per day(Symbol &) Vip Lvl 6 - +25% ExP/Sp/Adena/Spoil/Drop, unlocks .vip command (Global gk/buffer/class master/dressme), World Chat shouts 30 extra times per day(Symbol &) Vip Lvl 7 - +30% ExP/Sp/Adena/Spoil/Drop, unlocks .vip command (Global gk/buffer/class master/dressme), World Chat shouts 35 extra times per day(Symbol &) Vip Points are given by purchasing items in the l2store, with each item purchased vip points are increased: vip LvL 1 -150 Vip points vip LvL 2 -300 Vip points vip LvL 3 -600 Vip points vip LvL 4 -800 Vip points vip LvL 5 -1000 Vip points vip LvL 6 -2000 Vip points vip LvL 7 - 3650 Vip points    All items that make the vip status so special can be found in GM-SHOP NPC at Giran Town : Misc Vip Buff Book - Has all buffs inside (Resists and 3rd class Buffs) Vip Card - allows you to use Global chat 99999 times (symbol &), to use dressme (.varmor),To enter tp raids with out consuming quest item Clan Reputation Poins Quest Halisha Marks for 3rd class Clan Quest items (for lvl 4-5 Clan) Epic Raids Quest items( Baium /antharas/valakas/frintezza Accesorys Hats - Tribal,military,metal,ninja hat Extennsion bonus Some Exansions - Expand Inventory,trade,warehouse,craft Bonus Rune Bonus vip Rune(30days) - +30% ExP/Sp/Adena/Spoil/Drop Bonus vip Rune(24hours)- +30% ExP/Sp/Adena/Spoil/Drop Bonus vip Rune(For Ever)- +30% ExP/Sp/Adena/Spoil/Drop Notice ! Bonus VIP Rune Dose Not STUCK with VIP Points Status! You can buy them separatly in case you don't want or need something from our VIP Points Status  
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock