How to save null in hashtables?

Tawnttoo

New Member
Reaction score
36
I'm having trouble erasing item handles. I presume there's a JASS word for saving nothing as an item handle. I tried with GUI saving handle of No Item, but it doesn't work. All I'm trying to do is clear an "inventory slot" in my system. Triggers and/or map will be posted when asked.
 

Tawnttoo

New Member
Reaction score
36
If I do that, it will erase every item handle connected to the child. I need to erase a single handle.
 

Solmyr

Ultra Cool Member
Reaction score
30
I don't think this can be done in GUI, but if you're willing to use some JASS, then do the following
JASS:
/* Check if the hashtable contains the desired handle. */
if HaveSavedHandle(table, parentKey, childKey) then
    /* Remove the handle from the hashtable. */
    call RemoveSavedHandle(table, parentKey, childKey) 
endif
 

Tawnttoo

New Member
Reaction score
36
Nope, it can't. Does using JASS require me to use some other programs besides WE to save/play the map? Or is it so that GUI is converted into JASS when the map is being tested (as I have understood)?


Thanks for your effort, but I already found a way to work around it.

Thanks again.
 

Sevion

The DIY Ninja
Reaction score
413
GUI is JASS. JASS itself requires no other programs at all.

Anyhow, just use the removing method.

It'd be more efficient than any workaround.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top