HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

A Parsing Bug - Syntax errors going through as success

10-20-2007, 06:28 PM#1
zergleb
I was trying to find a bug in my game and I noticed that I had a problem with my syntax and it was letting it go through and that's why my function wasn't working. here's the code

Collapse JASS:
function CreateAttEffect takes loc3d ThisLoc3d, integer EffectType returns nothing
    local unit EffectUnit CreateNonUnitAtLoc(Player(12), 'hpea', ThisLoc3d.GetLoc(), 0.0)
    //call TriggerExecute(DestroyAttEffectTrigger)
    call PolledWait(.4)
    call RemoveUnitSafe(EffectUnit)
endfunction

Notice that after local unit EffectUnit there is no = between that and the CreateNonUnit function, yet it still went through as a success.(if you're curious it just makes a unit that has in it's extra struct functions put in as a non InGame unit so it doesn't get affected by attacks or get auto-targeted by one of my triggers.)
10-20-2007, 09:19 PM#2
Vexorian
Well, if you ran it with grimoire's war3err it would tell you that EffectUnit is not initialized, gonna add this to the queue of things to fix although I think I fixed an issue like this before? What version of jasshelper are you using?
10-20-2007, 10:43 PM#3
zergleb
I even double checked to make sure, i'm running 9.9.3 and yes I have been getting a lot of uninitialized variables errors. Only one of them I didn't really get why.