Check Failure - Expression

0 favourites
  • 2 posts
  • C2 r72 64bits; Intel Core i5-2500K GHz (x4), 8 Go DDR3, NVIDIA GeForce GTX 560 Ti, Win 7 Pro

    Firefox 8.0.1; Chrome 15.0.874.121 m

    I tried to do a conditionnal expression.

    Event: System compare "OffsetX" equal "64?OffestX=0:OffsetX=64"

    (OffsetX is a local variable)

    Launched the preview

    ---------------------------

    Construct 2 Check failure

    ---------------------------

    Check failure! This is probably a bug:

    Calling IsConstant() before Evaluate()

    Condition: checked_constant

    File: Projects\ExpTree.cpp

    Line: 97

    Function: bool __cdecl ExpNode::IsConstant(void) const

    Build: release 72 (64-bit) checked

    Component: Construct 2 IDE

    (Last Win32 error: 0)

    You are using a 'checked' release of Construct 2, intended for testing, which causes certain errors to be reported this way. Hit Ctrl+C to copy this messagebox - it's useful information for the developers, so please include it with any bug reports! Click 'Abort' to quit (unsaved data will be lost!),'Retry' to turn off messages for this session and continue, or 'Ignore' to continue normally.

    ---------------------------

    Abandonner   Recommencer   Ignorer   

    ---------------------------

    Ignored 3 times, I was able to come back to C2.

    I guess it is not the right way of doing a conditionnal.

    Reporting for the sake of the check failure.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks for the report, fixed for next build.

    FYI the expression "64?OffsetX=0:OffsetX=64" reads as:

    1. Is 64 not equal to 0?

    2. If so, return 1 if OffsetX equals 0 else return 0.

    3. If not, return 1 if OffsetX equals 64, else return 0.

    This is nonsense and can be simply written "OffsetX=0". Still, the weird expression uncovered a bug which has been fixed, so it's fine I suppose :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)