Blank Appication stopped working

I have a blank application that has already been working last night I made some corrections, tested the code and stopped working.
I started to debug by creating a new blank application and copying chucks of code into the new test blank application checking for bugs.
I got a clean run up until this 5 lines below.
The program runs the function “check_existing_venta();” but does not like the if statement afterwards.
I have pasted the if statement as it is below onto a new blank test application and the test runs fine with no problems
Can someone tell me what could be the reason for this? there is nothing wrong with the if statement but as soon as I take it out the blank application does run
and I can see the LAST print statement.

check_existing_venta();

if (([glo_alert_flag] == 2)) {
print “VENTA YA EXISTE BYPASS RECORD !!! “.”<br/>”;
}

print “END OF PROCESS END OF LOOP !!! “.”<br/>”;

How you set [glo_alert_flag]?

[glo_alert_flag] is set to zeros prior to calling function “check_existing_venta()” which in turn will change the value of [glo_alert_flag] and return a zero when the record is NOT found or will return a 2 when the record IS found so I don’t think that global variable is the problem it just won’t run and will not give me an error even if i turn debug on.

I am not sure I already mentioned it but the code the way it is was working before, I am on the second week running with no problem and it simply stopped working and I can figure out what is wrong with it.

You can upload this app and i’am will look in …

I never uploaded an app so I am not sure how to upload the application or how you would test without database tables and such, please advice

Export the app and upload that as attachment. We can probably already see where the problem lies without data … if not, we look further.