Help with Hashtable natives

NineClick

New Member
Reaction score
11
What is the difference between parentKey and childKey? What if I have 1 for parentKey and 0 for childKey? What will happen? Is it a row and a column? What is FlushChildHashtable? What is FlushParentHashtable? What is agent? I just need an idea on how to use these things. Thanks.
 

Azlier

Old World Ghost
Reaction score
461
Think of a hashtable as a 2-D array.

This is your average array.

[]
[]
[]
[]
[]

This is a 2-D array.

[] [] [] [] []
[] [] [] [] []
[] [] [] [] []
[] [] [] [] []
[] [] [] [] []

Parentkey can be rows, childkey columns. Or vice versa, it's the same data either way.

An agent is pretty much any handle that can leak. Except for players, I think.

[lJASS]FlushParentHashtable[/lJASS] clears all the data under a certain parent key. [lJASS]FlushChildHashtable[/lJASS] clears a certain childkey, I believe. Or all childkeys with the id. I'm not sure about this one.
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
According to the tips in the GUI, FlushParentHashtable clears the entire hashtable, while FlushChildHashtable clears all children of a certain parent key.
 

Azlier

Old World Ghost
Reaction score
461
And that's what I get for not using hashtables.
 

NineClick

New Member
Reaction score
11
Ah ok. So it's like a row and column. I'm storing data in Row x and Column x of a hashtable. So any integer is fine?
 

Viikuna

No Marlo no game.
Reaction score
265
Integers dont really represent anything, which kinda suck, but happily JassHelper can generate those integers for you, if you use keys.

See more about keys here: link.

So, instead of using numbers such as 0, 1 and 2, that dont really mean anything, you can use meaningful words, like: BuffType, BuffInstance, BuffSource, etc.
 

NineClick

New Member
Reaction score
11
So, instead of using numbers such as 0, 1 and 2, that dont really mean anything, you can use meaningful words, like: BuffType, BuffInstance, BuffSource, etc.

wow. nice. i didn't know that. i thought its really a number. thanks. that will make things a lot easier for me now. thanks guys! bump! :thup:

PS: thanks for the link. its very useful. :D
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top