Hey again guys, you probably remember me from my never-ending, relentless-going-on-shameless queries about Anachron's vjass inventory system.
I'm back! This time what started as a simple tweak to pair special effects attached to the real unit to be created in tandem with the dummy inventory unit has ended in a fundamental breakdown of my understanding of vjass.
PurgeandFire111 got me off to a great start, but for some reason his code isn't working on my triggers. I'm fairly certain I entered the code in correctly. So, then I looked up some possible causes and saw maybe its because I need to update jasshelper or patch to the latest wc3 patch. And I didn't import any .j files which I learned can cause similar compile errors.
No matter how hard I try, I always get:
Error: undeclared function: LoadUnit
Error : undeclared function: SaveUnit
Here is some code snippets to clue everyone in on my hashtable format
Here it is the real unit is saved as it is created:
And here is when the unit should be loaded to check what special effects to destroy:
It seems simple enough right? I've spent five days trying this and that with nothing to show for it. Anybody have any thoughts? I hope its not something with my Newgen or something more fundamental. Any help at all is appreciated!
I'm back! This time what started as a simple tweak to pair special effects attached to the real unit to be created in tandem with the dummy inventory unit has ended in a fundamental breakdown of my understanding of vjass.
PurgeandFire111 got me off to a great start, but for some reason his code isn't working on my triggers. I'm fairly certain I entered the code in correctly. So, then I looked up some possible causes and saw maybe its because I need to update jasshelper or patch to the latest wc3 patch. And I didn't import any .j files which I learned can cause similar compile errors.
No matter how hard I try, I always get:
Error: undeclared function: LoadUnit
Error : undeclared function: SaveUnit
Here is some code snippets to clue everyone in on my hashtable format
JASS:
scope test initializer init
globals
hashtable HeroHash = InitHashtable()
endglobals
Here it is the real unit is saved as it is created:
JASS:
call SaveUnit(HeroHash, GetHandleId(hero), 1337, fakeInv)
And here is when the unit should be loaded to check what special effects to destroy:
JASS:
call DestroyEffect(.dummyeffects[i])
if theUnit != null then
set .dummyeffects[i] = AddSpecialEffectTarget(.sfx[i], LoadUnit(HeroHash, GetHandleId(theUnit), 1337), .attachments[i])
It seems simple enough right? I've spent five days trying this and that with nothing to show for it. Anybody have any thoughts? I hope its not something with my Newgen or something more fundamental. Any help at all is appreciated!