• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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 15
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