Else section always work

Get help using Construct 2

Post » Mon Mar 04, 2013 11:58 am

Hello everybody,

I am new to Construct 2.
I have tried to program a Fibonacci function.

It works quiet well, but I have a general problem with the else section.
It seems that even when the if condition is true, the else section is
being execute as well.

(This is where the answer should have been 1, not 2!!!)

Can anyone tell me what i am doing wrong ?

Thank you in advance

Eyloneylonkoren2013-03-04 12:07:32
Posts: 2
Reputation: 454

Post » Mon Mar 04, 2013 12:49 pm

Hi everyone,

I found the problem.
The two conditions: Parameter 0 = 1 -or- Parameter 0 = 2
should have been: Parameter 0 = "1" -or- Parameter 0 = "2"
because the parameter comes from a text box as a string!

It is interesting to see that the condition: Parameter 0 <= 10
do work, even when the same parameter also comes from a text box as a string.

Eylon eylonkoren2013-03-04 13:33:33
Posts: 2
Reputation: 454

Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests