HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

WE Crashing

03-25-2006, 12:23 AM#1
Immoralis
crashes when i save
Collapse JASS:
function TimedSFXU takes unit u, string body, real time, string sfx returns nothing
    local effect eff
    call AddSpecialEffectTargetUnitBJ( body, u, sfx )
    set udg_SFX_Store[1] = GetLastCreatedEffectBJ()
    set eff = udg_SFX_Store[1]
    call PolledWait( time )
    call DestroyEffect(eff)
    set eff = null
endfunction

Collapse JASS:
call AddSpecialEffectTimed(u, "overhead", 5.0, "Abilities\\Spells\\Orc\SpiritLink\\SpiritLinkTarget.mdl")
03-25-2006, 12:32 AM#2
Blade.dk
"Abilities\\Spells\\Orc\\SpiritLink\\SpiritLinkTarget.mdl"

There was missing a \ after Orc.

Also, the name of your function and the line where it calls it doesn't seem to be correct.
03-25-2006, 12:32 AM#3
Taur
Quote:
set udg_SFX_Store[1] = GetLastCreatedEffectBJ()
I believe in pure JASS you cannot use GetLastCreatedEffectBJ(), because the local variable is not created in JASS when u create a special effect. I'm not very sure but I think it would be

set udg_SFX_Store[1] = AddSpecialEffectTargetUnitBJ( body, u, sfx )

not sure about that thought

and

Quote:
call AddSpecialEffectTimed

your function is called TimedSFXU not AddSpecialEffectTimed