OK, this is REALLY infuriating. I'm JUST trying to write a function in the trigger editor, but it is like the map editor is trying to run my expressions IN THE MAP EDITOR using the DEFAULT values (WTF?!). First, I discovered that I couldn't even do any math using the parameters I am passing in or I would get the "Error initializing variable" error. So, I added local variables that were initialized to junk values (like zero) and then set equal to the passed parameters just so the map editor would shut up and allow me to use the passed in values in an expression. Now, I'm trying to just divide two numbers by each other, but the map editor thinks I'm trying to divide by zero. This screenshot sums it up perfectly:
innerRadius and outerRadius are VARIABLES so why the !@#$ does the map editor think this is a divide by zero? Why is it even CHECKING if it's a divide by zero, did the programmers not understand the definition of VARIABLE?!
Actually, this behavior seems to have changed. I went and opened an older map (about a year old) and it gives me errors when I try to edit the expressions. Could a recent patch have introduced a bug, or is there some awful setting I have enabled somewhere on the map editor?
You should just move onto using galaxy script instead of gui. But here's a work around to defeating the problem of it not allowing you to edit the expression. Set your local variables that your passing into the expression greater than zero. Once the expression is created/modified, set your locals to zero.
Alternative is to just use ArithmeticInt or ArithmeticReal functions instead of an expression if you can.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
OK, this is REALLY infuriating. I'm JUST trying to write a function in the trigger editor, but it is like the map editor is trying to run my expressions IN THE MAP EDITOR using the DEFAULT values (WTF?!). First, I discovered that I couldn't even do any math using the parameters I am passing in or I would get the "Error initializing variable" error. So, I added local variables that were initialized to junk values (like zero) and then set equal to the passed parameters just so the map editor would shut up and allow me to use the passed in values in an expression. Now, I'm trying to just divide two numbers by each other, but the map editor thinks I'm trying to divide by zero. This screenshot sums it up perfectly:
https://imgur.com/lwj32NF
innerRadius and outerRadius are VARIABLES so why the !@#$ does the map editor think this is a divide by zero? Why is it even CHECKING if it's a divide by zero, did the programmers not understand the definition of VARIABLE?!
Here's an example that's about as simple it could be:
https://imgur.com/PnJqciX
1) The map editor should not attempt to evaluate expressions within the trigger editor screen.
2) It's not even correct.
Actually, this behavior seems to have changed. I went and opened an older map (about a year old) and it gives me errors when I try to edit the expressions. Could a recent patch have introduced a bug, or is there some awful setting I have enabled somewhere on the map editor?
Here's the error I get when I try to edit the expression I made like a year ago.
https://imgur.com/xG0fR3R
Nothing's changed. The trigger works fine. But now, the map editor won't let me edit the expression.
I started a topic on Blizzard's forums about this:
https://us.battle.net/forums/en/sc2/topic/20761696976#1
You should just move onto using galaxy script instead of gui. But here's a work around to defeating the problem of it not allowing you to edit the expression. Set your local variables that your passing into the expression greater than zero. Once the expression is created/modified, set your locals to zero.
Alternative is to just use ArithmeticInt or ArithmeticReal functions instead of an expression if you can.