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

Status
Not open for further replies.
Level 15
Joined
Jul 19, 2007
Messages
855
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,928
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 73
Joined
Aug 10, 2018
Messages
7,866
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.
 
Status
Not open for further replies.
Top