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

My WE can't do Key (Handle ID of (<anything>))

Status
Not open for further replies.
Level 45
Joined
Feb 27, 2007
Messages
5,578
Hashtables.png

When trying to save/load stuff in GUI hashtables I can't select anything under Hashtable - Get Handle ID. The screenshot above is from a demo map about hashtables (attached) and all I did was double click to edit the Key (Target unit of ability being cast) and it shows there's nothing to select. I can put a bona-fide GUI handle variable there, but then I can't assign that variable to anything because GUI has no handle actions and won't let you typecast.

I don't use GUI hashtables but I just noticed this and it's bizarre. Anyone else have this bug? Is this something with NewGen specifically? If I load the map in the vanilla WE all the appropriate things show up for Handle ID selection.
 

Attachments

  • Hashtable Tutorial.w3x
    27.3 KB · Views: 46
Level 11
Joined
Dec 19, 2012
Messages
411
It is due to NewGen is using the older version of WE, which doesn't have the support of it.

You would have 2 choices, if you want pure GUI, load the map in vanilla WE, use the get handle function provided by GUI, and back to NewGen WE, or just use custom script to get the handle id.
 
Level 10
Joined
Sep 16, 2016
Messages
269
Use custom script for that: create a variable type Handle. To save data, do like this
  • Set TempUnit = (Triggering unit)
  • Custom script: set udg_TempHandle = udg_TempUnit
  • Hashtable - Save 1000 as (Key SkewRange) of (Key TempHandle) in SpellData
When you want to load data
  • Set TempUnit = (Picked unit)
  • Custom script: set udg_TempHandle = udg_TempUnit
  • Set TempReal = (Load (Key SkewRange) of (Key TempHandle) from SpellData)
 
Level 11
Joined
May 16, 2016
Messages
730
don't use GUI hashtables but I just noticed this and it's bizarre. Anyone else have this bug? Is this something with NewGen specifically? If I load the map in the vanilla WE all the appropriate things show up for Handle ID selection.
No panic, bro.
Custom script: set udg_integer = GetHandleIdBJ( udg_unit )

where integer - ID you want to get (Like Key of (blah blah)
unit - you can use unit, destructible, items
 
Level 12
Joined
May 22, 2015
Messages
1,051
As mentioned, the problem is due to JNGP. It is actually why I originally switched back to the vanilla editor (also because I didn't understand JASS at all and didn't actually use the JNGP features for anything).

GUI hastables are so confusing and messy with the dumb english wording. JASS hashtable code is so much more readable:
JASS:
call SaveInteger(myTable, key1, key2, 9001) // Save 9001 as key2 of key1 in myTable
call LoadInteger(myTable, key1, key2) // Load that same integer
 
Status
Not open for further replies.
Top