- Joined
- May 10, 2024
- Messages
- 28
Hi. I want to manually remove stored integer value under specific key from hashtable. Built in functions is not working.
Script below saves random integer under
Script below saves random integer under
Key (Picked unit)
in hastbale and removes it if that integer exists. Stored value should change every 2 seconds from nothing to number but it is not changing.-
Tick
-
Events
- Time - Every 1.00 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Picked unit)) Equal to Paladin
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Key (Picked unit).) is stored as a Integer of 0 in hashtable..) Equal to True
-
Then - Actions
- Game - Display to (All players) the text: (Value is stored: + (String((Load (Key (Picked unit).) of 0 from hashtable.))))
- Hashtable - Clear all child hashtables of child (Key (Picked unit).) in hashtable.
- Set VariableSet handleId = (Key (Picked unit).)
- Custom script: call RemoveSavedInteger(udg_hashtable,udg_handleId,0)
-
Else - Actions
- Game - Display to (All players) the text: (Value is not stored: + (String((Load (Key (Picked unit).) of 0 from hashtable.))))
- Hashtable - Save (Random integer number between 1 and 999) as (Key (Picked unit).) of 0 in hashtable.
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
-
Events
Clear all child hashtables of child
which should remove all values under (Key (Picked unit)
but it is not working as well. How to remove integer value from hastbale? What about other types?