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

[Solved] JNGP and the Key function

Status
Not open for further replies.
Level 4
Joined
Aug 11, 2013
Messages
65
Hey guys,

Having a bit of an issue with the JNPG with Hashtables.

  • Hashtable - Save Handle Of(Target unit of ability being cast) as (Key target) of (Key (Triggering unit)) in HashTable
The last Key Handle part doesn't come up when i go to click on it. If you create the trigger in JNGP youll know what im talking about. Kind of hard to explain haha.

Also what is the latest version of JNGP? maybe i have an out of date version?

Thanks
 
Last edited by a moderator:
Level 4
Joined
Aug 11, 2013
Messages
65
No, i dont have any of that. The only thing i have is the JNGP.

Its wierd cause it works in the normal editor...
 
Yeah, it is a known issue. There isn't a fix available for it.

Just some random info in case you're interested. If you go to your Warcraft III folder, you'll notice three world editor files:
  • World Editor.exe
  • worldedit.exe
  • worldedit121.exe
Grimoire (the part of JNGP that injects itself into the editor) can inject into worldedit121.exe, but not worldedit.exe. The two are essentially the same (both have hashtable functions--added in 1.24), but worldedit121.exe doesn't show parameters for the Key() function. This is why if you save a map using the regular editor, and then load it in JNGP, it'll show the message "You have saved this map with a more recent version of the editor", because worldedit121.exe is an older version of the editor (presumably patch 1.21).

As for World Editor.exe, that just calls worldedit.exe.

How would one work around it? Use a custom script. Before you say "*sigh* not more JASS", it is pretty simple:
  • Set CasterVariable = (Triggering unit)
  • Custom script: set udg_MyKeyVariable = GetHandleId(udg_CasterVariable)
udg_ is just a prefix before a global. In the example above, I assign the key (handle id) of "CasterVariable" to "MyKeyVariable". "MyKeyVariable" should be an integer variable. You can name it whatever you like, just make sure you change the part after "udg_" to the name of your variable. Then you can just use "MyKeyVariable" as the input for your hashtable.
 
Level 4
Joined
Aug 11, 2013
Messages
65
Yeah, it is a known issue. There isn't a fix available for it.

Just some random info in case you're interested. If you go to your Warcraft III folder, you'll notice three world editor files:
  • World Editor.exe
  • worldedit.exe
  • worldedit121.exe
Grimoire (the part of JNGP that injects itself into the editor) can inject into worldedit121.exe, but not worldedit.exe. The two are essentially the same (both have hashtable functions--added in 1.24), but worldedit121.exe doesn't show parameters for the Key() function. This is why if you save a map using the regular editor, and then load it in JNGP, it'll show the message "You have saved this map with a more recent version of the editor", because worldedit121.exe is an older version of the editor (presumably patch 1.21).

As for World Editor.exe, that just calls worldedit.exe.

How would one work around it? Use a custom script. Before you say "*sigh* not more JASS", it is pretty simple:
  • Set CasterVariable = (Triggering unit)
  • Custom script: set udg_MyKeyVariable = GetHandleId(udg_CasterVariable)
udg_ is just a prefix before a global. In the example above, I assign the key (handle id) of "CasterVariable" to "MyKeyVariable". "MyKeyVariable" should be an integer variable. You can name it whatever you like, just make sure you change the part after "udg_" to the name of your variable. Then you can just use "MyKeyVariable" as the input for your hashtable.

Ok yep, i thought it would be a known issue, i think id rather just load the normal editor and edit that hashtable trigger though if i ever need to.

Thanks for the information anyway
 
Status
Not open for further replies.
Top