• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Map won't work after 1.24!

Status
Not open for further replies.
Level 18
Joined
Jan 21, 2006
Messages
2,552
Any use of function H2I takes handle h returns integer will not work with the new patch. I'm assuming you used that function because of how astronomical it used to be, but now you must replace any code you used to have that stored variables to handles (such as HandleVars) with the hashtable equivalent.

JASS:
globals
    hashtable   table                   = InitHashtable()
endglobals


//####################
//# Hash Tables
//# -----------
//#     Think of a hashtable as a 2-dimensional array without any bounds. The table itself is an object to
//#     which values can be assigned given 2 coordinates.
//#     
//#     In the following example, "table" represents the 2-dimensional array, "GetHandleId(t)" represents one
//#     of the necessary coordinates, "1" represents the other, and "i" represents the value that I want to store.
//#
function UseHashtables takes nothing returns nothing
    local timer t
    local integer i
    
    set t = CreateTimer()
    set i = 5
    
    call SaveInteger(table, GetHandleId(t), 1, i)          
endfunction

Hopefully this helps a little. I hope you get your map working again.
 
Status
Not open for further replies.
Top