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

Hashtables bugged or outdated?

Status
Not open for further replies.
Level 6
Joined
Jul 2, 2013
Messages
156
Hello I've been years away from hive, just started anew, so I am using JNPG and was following a tutorial for hashtables from here Hashtables and MUI

But this option simply doesn't exist:
  • Hashtable - Save 10.00 as 0 of (Key (Target unit of ability being cast)) in hashTable
And it is exactly what I need to make my HoT Spell. The closest I find is Key(String)Target unit of ability being cast, but this gets overwritten on the 2nd unit, and the spell doesnt work for more than 1 unit at a time. Will appreciate any help, thanks.

PS: Where is DR super GOOD? : D
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
It exists:
1695053264321.png

You need to get the Handle (id) of an object.
 
Last edited:
Level 6
Joined
Jul 2, 2013
Messages
156
Ok I just tested on my other pc with reforged world editor and it exists there. But When I go back to my JNPG patch like 1.26 or so, this option doesn't exist. If I click "Handle" There aren't any functions, there is only the option to select a variable of type handle. Any idea why would that happen? Is my JNPG bugged?
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
Ok I just tested on my other pc with reforged world editor and it exists there. But When I go back to my JNPG patch like 1.26 or so, this option doesn't exist. If I click "Handle" There aren't any functions, there is only the option to select a variable of type handle. Any idea why would that happen? Is my JNPG bugged?
I don't know, it's probably just an incompatible version.
 
Level 6
Joined
Jul 2, 2013
Messages
156
I see, thanks for help, I will try re-install, hopefully that fixes it. I'm not sure what version of JNPG I have. If anyone else has other ideas to fix this, I'll also gladly hear them.
 
Level 6
Joined
Jul 2, 2013
Messages
156
That's pretty sad, reforged editor crashes often and doesnt support VJASS, otherwise seems a bit improved(Some new weird terms as well).
So I use either 1.26 or JNPG. Actually I might have found a workaround, switching between 1.26(Hashtables not bugged there) and JNPG : D
Or I'll try converting to custom text, since I remember re-installing JNPG is a pain.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
That's pretty sad, reforged editor crashes often and doesnt support VJASS, otherwise seems a bit improved(Some new weird terms as well).
So I use either 1.26 or JNPG. Actually I might have found a workaround, switching between 1.26(Hashtables not bugged there) and JNPG : D
Or I'll try converting to custom text, since I remember re-installing JNPG is a pain.
It supports vJass although JassHelper is disabled by default (simply enable it in the Trigger Editor). Also, the crashes tend to be related to imported HD assets. I recommend saving the map as a folder (another nice feature of newer versions) and managing your imported assets outside of the editor.
 
Level 6
Joined
Jul 2, 2013
Messages
156
Oh didnt know that. Nice then. About the crash - i was doing basic stuff in object editor i think, but dont remember what exactly.
 
Level 19
Joined
Oct 17, 2012
Messages
859
Since JNGP is based on an old version of the World Editor, you get that problem with hashtables in GUI. A workaround would be to set an integer variable to the handle id of the unit and then use the integer variable as the key.
  • Set TargetVariable = (Target unit of ability being cast)
  • Custom script: set udg_MyKeyVariable = GetHandleId(udg_TargetVariable)
  • Hashtable - Save 10.00 as 0 of MyKeyVariable in hashTable
 
Status
Not open for further replies.
Top