[SOLVED] "Display" showing out-of-date data?

Started by Monsieur OUXX, Sat 01/02/2014 23:27:09

Previous topic - Next topic

Monsieur OUXX

I have this code in a module's on_key_press, literally like this :
Code: ags

        int key;
        ...
        Display(String.Format("key=%d",  key)); //DEBUG
        if (key == 91)  //'['
          text = text.AppendChar(92); 


I put a breakpoint on text = text.AppendChar(92); .
When I execute, the Display shows "key=91". That would mean key == 91.
Yet, the if (key==91) is never true, and the instruction with the breakpoint is never reached.
What is this wizardry???

EDIT: actually it's only the breakpoint not happening. I don't know why. But that explains everything, and the script works as expected.
 

SMF spam blocked by CleanTalk