• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Hashtable problem

Status
Not open for further replies.
Level 11
Joined
Jan 23, 2015
Messages
788
Hi, I am saving a few timer handles into a hashtable and I am loading their data once the timers expire with the (Key(Expiring Timer)).

I am saving 2 integers and 1 real for each timer and I don't know how to load the data of another timer which is not the expiring one.
 
Level 16
Joined
Mar 25, 2016
Messages
1,327
Hashtable functions are very bad in GUI. I remember for units you could not get the key of a specific unit variable, but you could use Key(Picked Unit) for example. Use a line of JASS instead, because it allows you to get the key of any timer.
First you need a temporary integer variable and your timer variable. In this case I use "Integer" and "Timer":
Add a custom script before your hashtable action: set udg_Integer = GetHandleId(udg_Timer)
Then you can use "Integer" as a key in your hashtable function.
 
Status
Not open for further replies.
Top