• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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