function AddSpecialEffectForPlayer takes string modelpath, real x, real y, player whichplayer returns effect local string s = ""
if GetLocalPlayer() == whichplayer then
set s = modelpath
endif
return AddSpecialEffect(modelpath, x, y)
endfunction
function AddLocalEffect takes player p, string path, real x, real y returns effect
if GetLocalPlayer() != p then
set path=""
endif
return AddSpecialEffect(path, x, y)
endfunction
Dont try that.
This is how it should be done:
JASS:function AddLocalEffect takes player p, string path, real x, real y returns effect if GetLocalPlayer() != p then set path="" endif return AddSpecialEffect(path, x, y) endfunction