• 🏆 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!

H2I error when trying to import "Aphotic Shield" from spellpack

Level 14
Joined
Jul 19, 2007
Messages
772
So I'm getting this H2I error again when trying to import an ability into my map. This time I'm trying to import "Aphotic Shield" from this spellpack Dota Spellpack but I keep getting these errors. Some help pls?
H2I error.png
 
Level 24
Joined
Jun 26, 2020
Messages
1,853
Its clear that it uses a function named H2I that you didn't imported from the map, so you have to search it and also import it to your map.
But probably since is an old map, that function uses the old return bug that is now patched so it wouldn't work if you are using a newer version of W3.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,564
I'm assuming you can repurpose H2I to do return any "unique" Integer Id:
vJASS:
function H2I takes unit u returns integer i
    return GetUnitTypeId(u)
endfunction
^ Try placing that code somewhere in your map above the rest of the triggers or place it directly in the code.

If you have a Unit Indexer then it'd probably be better to return GetUnitUserData(u)

But that's a big assumption, it sounds a bit too good to be true that it'd just work.
 
Top