• 🏆 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 how to use handle id as a key?

Status
Not open for further replies.
Level 12
Joined
Nov 3, 2013
Messages
989
I've had some problem before with world editor & hashtable because it didn't work to use abilityID variables as keys (since they're just integers or whatever it was).


It's been a while since I even used the WE nevermind hashtables, but am I missing something or is my WE bugged somehow? I'm pretty sure "Get Handle ID" is supposed to allow me to use the regular functions e.g. using (Triggering Unit) as a primary key and then saving a bunch of stuff to the secondary key...

500904eb8c.png


fea699c7e4.png


c809a26a69.png


so to explain the pictures just in case:

picture 1: I clicked on the second "Value" meant to be used as the primary key.

picture 2: I clicked on "Handle" from "Get Handle ID" to later select my unit to use as the key in the next step.

picture 3: apparently it only show the "Variable" section...
And I ried the other ones as well, none of the Hasltable - Save (integer/unit/real/whatever) worked as far as I can tell...

Now I assume that I could still do it with jass, but that sort of beat the whole point here. I wasn't really going to do anything complex. I just wanted an easy to use 2d array...
 
Level 15
Joined
Mar 25, 2016
Messages
1,327
Are you using JNGP are any other special editor?
I use JNGP and it is bugged for me as well. I don't care much, because I only use them in JASS. It's confusing to use hashtables in JASS and GUI at the same time, because the parameters are swapped.
You can use custom script before that:
set udg_Key = GetHandleId(GetTriggerUnit())
and then use your GUI hashtable action and use the integer Key as your key.
 
Level 12
Joined
Nov 3, 2013
Messages
989
Are you using JNGP are any other special editor?
I use JNGP and it is bugged for me as well. I don't care much, because I only use them in JASS. It's confusing to use hashtables in JASS and GUI at the same time, because the parameters are swapped.
You can use custom script before that:
set udg_Key = GetHandleId(GetTriggerUnit())
and then use your GUI hashtable action and use the integer Key as your key.
ah clever workaround, and yeah I do use a special editor.
 
Status
Not open for further replies.
Top