- Lesson 21 is mostly right on your part.
I'd suggest using a 32-bit calculator to review one of them
- Lesson 22 asks about the validity of the expressions, meaning whether they are valid JASS expressions or not, not the value of the expression.
- I'd suggest going over what ~ actually does. It's not like "not".
not turns anythng that has a value not equal to false/0 into false.
It turns 0/false into true.
~ reverses the bits, so 0 becomes 1 and 1 becomes 0.
- Lesson 23 also asks for the validity of the expressions, meaning if they are valid JASS expressions or not.
Strings can't actually be compared with anything other than the ==/!= operators ;p
Yes, in C/C++ and the like, "1" > "0" == true would make sense, as you'd interpret them as Base 256 ASCII ints or whatever. (Chars in this case)
- About this:
Code:
// you got me so confused about reals and what they print the other day
// so let's say this is TRUE because the only way I know to check this
// is to print it ingame and that will take some time, could you tell me if there's a faster way?
You're right.
Printing them is the way to go
This allows users to go "wtf, is this possible?" because not everyone in here knows how reals are stored in memory
- I'm going all wtf at Lesson 25 P2 o-O
Bro, you need to find a smart way to detect whether something is a number or not.
I'll give you a hint. You need to use a combination of two reciprocal natives to do a number-validation smartly
- IsUnit is the same as unit1 == unit2
- You should probably print the result of (78568886. == 78568886)
- I would suggest printing angle values for a unit, because there's a trick you didn't pay attention to in the Project.
Angle values suck in Wc3 :c