There isn't always a warning for an empty if/else statement
Numbered Steps to Reproduce Problem:
Use the code between, but not including, the divisions below and compile. With the exception of the line with an "Invalid expression" error, my text code was a verb at the top of a used code file, and the given code was the entirety of the "Go Man Go" verb and all lines had the same indentation. As evidenced in the "Invalid Expression" case, the line after said verb was just a global variable assignment. This is in my Tesht.dme environment, so you're not allowed to question my organization. It's a single 1500-line code file that I use to test anything I need tested~
Code Snippet (if applicable) to Reproduce Problem:
//------- This brings up no warning.
if(1)
else
//------- This, too.
if(1) Do_Stuff
else
//------- "Invalid expression" error on the last line
mob/verb/Go_Man_Go()
if(1)
world/name = "Cool, Cool Game" //Error on this line, which has no indentation at all. If you name your game this, I want royalties.
//------- "if statement has no effect" warning
if(1)
return
//------- No warning
while(1)
return
//------- No warning
while(1)
if(1)
else
//-------
Expected Results:
None of the above statements should be getting through without a warning or error.
Actual Results:
Some of them do.
Does the problem occur:
Every time? Or how often? All of the time
In other games? Caught it in my Board Game Maker, tested it in my Tesht.dme environment
In other user accounts? Untested
On other computers? Untested
When does the problem NOT occur?
I've posted all of my test cases.
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked?
I haven't coded anything for a few months, and I never leave ifs blank, so I have no idea. I caught this because I commented out a block of code so that it would throw an error today and I'd know where I left off yesterday :O So much for that.
Workarounds:
Do it right the first time! If you don't leave any ifs/elses empty, you won't miss any warnings.