• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

GUI to JASS

Status
Not open for further replies.
Level 33
Joined
Mar 27, 2008
Messages
8,035
Hello there, yesterday I have downloaded the famous JNGP to learn JASS way because I want to improve (slowly). Everything is going according to plan (I did some function calls, local variable, etc). I was planning to convert my trigger method from GUI to JASS slowly (as I mentioned before). Slowly means, at the same time, I am learning JASS and slowly taking a small portion of GUI method into JASS (to get used to it). Until the problem comes in... As usual, my current method is using hashtable (doesn't prefer indexing, don't ask, don't argue) and if I use hashtable method, surely I want to save each of the Handle ID by using Integer (every unit has its own Handle ID, which is unique and from this, we can make it MUI-type trigger).

As usual, if we want to save Handle ID, we use this:
  • Set HandleID = (Key (Triggering unit))
This CAN be made in normal WE (without JASS support installed)

However, with the JASS support installed in my WE, I can no longer use that function, and the words came up was...
"No variables of this type defined", ONLY that. I was like "wtf?". All I want is the "Function:" that starts with the "Hashtable - Load Player Handle" but that option suddenly disappears from the list of command in GUI. Is this normal ? Or I had installed it, wrongly ?

My main purpose is to keep JASS support installed in my WE, and at the same time, I am doing GUI stuff. After doing it, I'll convert the GUI stuff into custom text to get a better understanding of the current functions and nulling stuff. That's all I want until suddenly, I can't save my Handle ID in (Key (Triggering unit)), that option suddenly... disappeared.
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
JNGP doesnt have hashtables in GUI...so you should use custom script when working with HT or better, custom texts...

In GUI, often you are asked for keys, like 'triggering unit', 'last created unit' and add that to a group...in JASS however, the keys are timers(not sure if there's more)...

Like this...

JASS:
local timer t
//and
set t = CreateTimer()
set childkey = GetHandleId(t)
//and blahh blahhh

then load it in another function...
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
Tips...

Learn vJASS straight away, like bassee told me...

If you cannot see the 'Reinventing the Craft' when you open JNGP, find this and set it to this...
-- Reinventing the Craft
havertc = true (SET THIS TO THIS)
if havertc then
rtcmenu = wehack.addmenu("Reinventing the Craft")
rtc_enabled = TogMenuEntry:New(rtcmenu, "Enable Reinventing the Craft", nil, true)
 
Status
Not open for further replies.
Top