• 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.

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