• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

[Solved] Hashtable do not save

Not open for further replies.
Level 10
May 28, 2011
I cant find the solution for this problem
I want to save indexA (integer variable) in spell_hashtable (hashtable variable) but it doesn't.
After i load it and display its value. it appear 0.
Is something wrong?


  • Hashtable leak.w3x
    19.1 KB · Views: 28
Level 15
Jul 4, 2008
@WaterKnight; Why to waste a trigger to just initialize a Hashtable, when you could just do
// Set Hashtable
if (udg_MyHashtable == null ) then
set udg_MyHashtable = InitHashtable()
// Other setups

If the jass version is too much to understand... I'm writing a CS version.

  • -------- --------
  • Custom script: if ( udg_MyHashtable == null ) then
  • Custom script: set udg_MyHashtable = InitHashtable()
  • Custom script: endif
  • -------- --------
Level 26
Aug 18, 2009
Slightly, it does slow down the game but TC named the hashtable as spell_hashtable, so would assume wants to use it in other spell codes, too, therefore, pasting this everywhere, would create more lines/trash/take space. Besides, you normally also do other things on init, you do not have to use a private trigger for it, or you inject it into main function with jass (if InitHashtable works there).
Not open for further replies.