Check Failure - Expression

Bugs will be moved here once resolved.

Post » Sat Dec 17, 2011 11:19 am

C2 r72 64bits; Intel Core i5-2500K @3.30 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.
Kyatric2011-12-17 11:20:22
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Posts: 6,930
Reputation: 56,894

Post » Tue Dec 20, 2011 1:12 am

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 :)
Scirra Founder
Posts: 22,821
Reputation: 176,106

Return to Closed bugs

Who is online

Users browsing this forum: Danwood and 1 guest