- Joined
- Aug 7, 2013
- Messages
- 1,338
Hi,
I started to get a lot of weird behavior with functions--they would suddenly not respond at all, even though they worked just in the previous version.
I believe it was because I had been passing uninitialized native variables, e.g. "boolean" or "integer" to functions. But it doesn't crash the game oddly enough. Which is worse in my opinion, because then I have no clue what is wrong.
e.g.
Now does JASS have default values for natives--e.g. booleans by default are false and integers are 0?
I think I didn't catch these errors because I'm used to languages like Java where the compiler tells you you didn't initialize a passed value. If that's the issue it should definitely be a feature of the VJASS compiler.
I started to get a lot of weird behavior with functions--they would suddenly not respond at all, even though they worked just in the previous version.
I believe it was because I had been passing uninitialized native variables, e.g. "boolean" or "integer" to functions. But it doesn't crash the game oddly enough. Which is worse in my opinion, because then I have no clue what is wrong.
e.g.
JASS:
boolean bool
...
if bool then
...
Now does JASS have default values for natives--e.g. booleans by default are false and integers are 0?
I think I didn't catch these errors because I'm used to languages like Java where the compiler tells you you didn't initialize a passed value. If that's the issue it should definitely be a feature of the VJASS compiler.