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

[JASS] Nullifying A Value In Hashtables

Status
Not open for further replies.
Level 16
Joined
Mar 3, 2006
Messages
1,564
This:
JASS:
function ClearHashtablePointDataTest takes nothing returns nothing
    local unit u = gg_unit_Emoo_0005
    call SaveUnitHandle(css_data , 1 , 1 , u )
    call pop(ut2s(u))
    call SaveUnitHandle(css_data , 1 , 1 , null )
    call pop(ut2s(LoadUnitHandle(css_data , 1 , 1)))
endfunction
Is displaying in the game:

-
pristessofthemoon
pristessofthemoon
Can I null a certain value in the hashtable without using flush functions ?
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
I am making a CSS (Combat State System) so I wanted to save a null value because I do loop search for the first null value (parent key is fixed and child key is a loop index) then I save a unit that is in combat to this location and when it leaves combat I simply fill that location with null but without being able to null this location the system fails, so that lead me to think of saving a dummy unit that will flag this location as null.

Anyway, thanks again for the info :)

<<< EDIT >>>

Actually, I found a way to null the value (PARTIALLY). Do you remember an old thread I posted about saving handles in a hashtable, where I found that you can't save more than one handle in the table. So I used that and saved a dummy item I created with the same parent and child keys so when I tried to get the value with the same keys but unit handles it returned null because I am already saving an item handle.
 
Last edited:
Status
Not open for further replies.
Top