• 🏆 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!

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

Status
Not open for further replies.
Level 39
Joined
Feb 27, 2007
Messages
5,024
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: 41
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
 

MindWorX

Tool Moderator
Level 20
Joined
Aug 3, 2004
Messages
709
This is something that was bound to happen. The original developer of wehack is gone, so we can't update JNGP anymore. Some of the staff have discussed making a replacement, but it might lack other features people have grown accustomed to.
 
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