• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Solved] Hashtable do not save

Status
Not open for further replies.
@WaterKnight; Why to waste a trigger to just initialize a Hashtable, when you could just do
[jass="OnSpellTrigger"]
// Set Hashtable
if (udg_MyHashtable == null ) then
set udg_MyHashtable = InitHashtable()
endif
// Other setups
[/code]

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
  • -------- --------
 
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).
 
Status
Not open for further replies.
Back
Top