You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a part of #73 I was going to add this note, but decided to look further into "why":
+@note You should not initialize game sounds as constants in Jass (why?)
In a reply there moyack says that the problem he had was due to a constant sound handle. He had an issue after loading a saved game.
Searching further, all I really found were posts on hive like this:
You shouldn't use handle variables as constant globals, make them nonconstant.
And then the only interesting discussion here, where nobody understands the logic of constant vs non-constant functions, and for handles only the issue with "wc3mapoptimizer" is pointed out (wrongly constant-folding handle variables). Though that's different from whatever bug moyack had after game load.
Basically, does anybody know what constants are good for (except basic types like int)? Should we add a general warning to handle type? (and then each descendant type too?) to never save handles as a constant?
The text was updated successfully, but these errors were encountered:
As a part of #73 I was going to add this note, but decided to look further into "why":
In a reply there moyack says that the problem he had was due to a
constant sound
handle. He had an issue after loading a saved game.Searching further, all I really found were posts on hive like this:
And then the only interesting discussion here, where nobody understands the logic of constant vs non-constant functions, and for handles only the issue with "wc3mapoptimizer" is pointed out (wrongly constant-folding handle variables). Though that's different from whatever bug moyack had after game load.
Basically, does anybody know what constants are good for (except basic types like int)? Should we add a general warning to
handle
type? (and then each descendant type too?) to never save handles as a constant?The text was updated successfully, but these errors were encountered: