• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Jass Checker false possitive

Status
Not open for further replies.
Level 19
Joined
Jul 2, 2011
Messages
2,162
Hello

I have a bug to report with our jass checker.

Jass checker seems to be unable to identify when an if statement is active and when it's completely off. Resulting in leak errors for every if statement you have.

This problem shouldn't be too hard to check. Simply write in a code that checks the values of the if statement(what it is looking for) and compare that value with every other if statement in that trig. If the if statement doesn't match any other statement value they you know that it activates separately from the other statements and thus can be excluded.

An example of this would be to create a for loop

for (int j=0;j<100;j++)
{
if(j==0){do action with location}
destroy location
}

If all your if statements activate at different times then you know that their locations need to only be destroyed once....

I hope this makes sense
 
Level 19
Joined
Jul 2, 2011
Messages
2,162
I'm pretty sure, having seen you code, that the issue is not with the jass checker, haha. Each one of your "if" statements, create a new location, which is the issue.
No they don't, if statements are effectively off until they are true

Meaning all those if statements only come on once, which is why I only destroy the location once each time that trigger runs
 
Level 19
Joined
Jul 2, 2011
Messages
2,162
The JASS checker has to assume that both cases of an if statement can be touched. It does not run the code, it can only look at it. Your request is impossible unless it actually runs the code which requires Wc3 to do so properly.
can't you change that

programming is like magic, everything is possible
 
off-top: is jass synt checker at the sticky links broken or it have some limitation on uploading size?
I could confirm it seemed to be broken. Tried a 18 KB map (for a small system) and error occurred. Also tried with my Night Empire map and yes, another error occurred.
 
Status
Not open for further replies.
Top