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