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

[Trigger] String vs Integer saving in Hashtable. What's best?

Status
Not open for further replies.

TKF

TKF

Level 19
Joined
Nov 29, 2006
Messages
1,267
  • CannonTable
    • Hashtable - Save A047 as 4 of Temp_Integer in HashTableCannons
    • Custom script: call SaveInteger(udg_HashTableCannons, udg_Temp_Integer, 5, 'A047')
    • Hashtable - Save h005 as 7 of Temp_Integer in HashTableCannons
    • Custom script: call SaveInteger(udg_HashTableCannons, udg_Temp_Integer, 8, 'h005')
I'm not very used to hashtables, so I'm asking someone who knows this that this can be referred to a casting event and if the unit can be created by the string or the integer value. Which one is the best? I will prefer the one which is most easy to use.

  • CannonTable
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • -------- Cannon Damage Data --------
      • -------- ---- --------
      • -------- Items rawcode array - Temp_Integer --------
      • -------- 0 - Damage (Real) --------
      • -------- 1 - Duration (Real) --------
      • -------- 2 - SpeedType (Integer/Group) (3 settings, moveslow, move and movefast) --------
      • -------- 3 - DamageTypes (Integer) (Crude, Normal, Magical, Spell, Siege, Pierce) --------
      • -------- 4 - Cannon Crude Ability (string) --------
      • -------- 5 - Cannon Crude ability ID (Integer) --------
      • -------- 6 - Cannon Crude ability level (Integer) --------
      • -------- 7 - Unit ID (string) --------
      • -------- 8 - Unit Type ID (Integer) --------
      • -------- ---- --------
      • -------- Basic Cannon (800) ---- --------
      • -------- Cannon Item --------
      • Custom script: set udg_Temp_Integer = 'I01S'
      • Hashtable - Save 200.00 as 0 of Temp_Integer in HashTableCannons
      • Hashtable - Save 1.00 as 1 of Temp_Integer in HashTableCannons
      • Hashtable - Save 1 as 2 of Temp_Integer in HashTableCannons
      • Hashtable - Save 1 as 3 of Temp_Integer in HashTableCannons
      • Hashtable - Save A047 as 4 of Temp_Integer in HashTableCannons
      • Custom script: call SaveInteger(udg_HashTableCannons, udg_Temp_Integer, 5, 'A047')
      • Hashtable - Save h005 as 7 of Temp_Integer in HashTableCannons
      • Custom script: call SaveInteger(udg_HashTableCannons, udg_Temp_Integer, 8, 'h005')
 
Status
Not open for further replies.
Top