Calling functions is not working from within if(){func}

Im trying to define:
this.unitsWithinRange = function(myUnit, allUnits, distance) {blah}

when I call it (either with this.unitsWithinRange(.,.,.) or unitsWithinRange(.,.,.) my character crashed and wont move for that round, and the editor screen says its undefined. Can someone tell me if this is possible, and how to make it work?

Thank you

some more testing:

i found that
this.say(this.myFunction()); says an array of throwers,
but this.Func( this.OFunc(this.myFunction)); wasn’t working… man that was hard to work out - it worked if not inside of any if statements

If I put it without any ifs around it, then it works fine.


Is this a problem with the parser? That was really hard to debug - it seemed like totally nonsense crashing.

Hmm–can you post your entire code for the unit? It does sound like a problem with the parser.

is it possible to PM it to you?

Yes; if you click on my face to see my profile, there should be a Private Message button.

I already looked for that, and cant find it. I used my eyes, and did a find for ‘message’.
Do i not have the right privileges?


am I missing something?

Looks like Discourse has a thing where you have to be trust level 1 before you have the ability to send private messages, and for that you had to have entered 5 topics, read 50 posts, and spent 10 minutes on the forum. You had read 49 posts. Ouch!

I lowered the trust level 1 requirement to 3 and 30 from 5 and 50, so you should see it now. Not sure exactly why they need to be so high.