Condition Expression Debug Message

For questions about using Classic.

Post » Tue Nov 23, 2010 7:38 pm

Hey,

I'm using a "condition expression" and it works perfectly but whenever I use the debug option this message pops up "Cannot test condition expression on a non-integer type. Operator had no effect."

The code works correctly, but it's just a little annoying to deal with this every time I debug.

Here's the code, if needed: [code:qx10do8d]Trail[CustomMovement].Speed<1000 ? Lerp(Trail.Width, 1, 10*TimeDelta):Lerp(Trail.Width, ((Min(Trail[CustomMovement].Speed/50, 30))*(Trail.Opacity/100)), 10*TimeDelta)[/code:qx10do8d]

What's up?
Follow me on Twitter @evgLabs
B
34
S
14
G
4
Posts: 251
Reputation: 4,074

Post » Tue Nov 23, 2010 10:31 pm

Looks like somethings getting turned into a string. Might try adding an int() on both sides.
Image ImageImage
B
169
S
50
G
174
Posts: 8,328
Reputation: 110,800

Post » Tue Nov 23, 2010 10:37 pm

That's what I thought. Could this be a bug?

I'll try it though.

Thanks
Follow me on Twitter @evgLabs
B
34
S
14
G
4
Posts: 251
Reputation: 4,074

Post » Tue Nov 23, 2010 10:40 pm

Hmm, the message says "Cannot test...". So I would guess it has problems comparing the float Trail[CustomMovement].Speed against the int 1000

Maybe just setting 1000.0 solves it? [Or int(Trail[CustomMovement].Speed), but then you're losing accuracy]
Image
B
24
S
8
G
10
Posts: 1,821
Reputation: 8,279

Post » Tue Nov 23, 2010 10:53 pm

I wouldn't call it a bug, it's just that the debugger is very particular.
Good in some ways, bad in others.
Image ImageImage
B
169
S
50
G
174
Posts: 8,328
Reputation: 110,800


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests