Annoying issue if you have an error in your code

For general Flowcode discussion that does not belong in the other sections.
Post Reply
RGV250
Posts: 264
http://meble-kuchenne.info.pl
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 23 times
Been thanked: 30 times

Annoying issue if you have an error in your code

Post by RGV250 »

Hi,
Not sure I have described the title very well.
I am new to flowcode but it probably catches other out as well. I was writing a calculation, when I clicked on OK it told me I had an error and did I want to create a variable. So far so good but I got the variable wrong, here is where the issue is, this time it does not let me edit the variable and I cannot alter the variable without closing the calculation, if I do that it basically deletes everything I have entered.
I think it would be a nice idea if it said there are errors, do you want to save with the error. I now copy the code and paste it back later but I find it a bit annoying that I cannot save it with errors.

Bob

chipfryer27
Valued Contributor
Posts: 1147
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 284 times
Been thanked: 412 times

Re: Annoying issue if you have an error in your code

Post by chipfryer27 »

Hi

If you have an error in your "formula" you need to fix it before closing (e.g. a syntax error)

However you can edit the variable from within the calculation properties box by hovering over the variable, clicking the down arrow to expand the variable and selecting edit.

Hope this helps

Steve-Matrix
Matrix Staff
Posts: 1253
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 167 times
Been thanked: 277 times

Re: Annoying issue if you have an error in your code

Post by Steve-Matrix »

Also, there is an "Allow errors in flowcharts" option in the Application tab of Global Settings. This will allow your calculations (and other icons) to have syntax errors, but obviously these errors will stop you project from being simulated or compiled.

alanwms
Posts: 117
Joined: Fri Dec 04, 2020 2:29 pm
Has thanked: 24 times
Been thanked: 7 times

Re: Annoying issue if you have an error in your code

Post by alanwms »

Not ALL variables can be edited. I have noticed that a floating point variable is there to stay. The only way I could edit it (Change it to a non floater) was to delete and start over.

Steve-Matrix
Matrix Staff
Posts: 1253
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 167 times
Been thanked: 277 times

Re: Annoying issue if you have an error in your code

Post by Steve-Matrix »

alanwms wrote:
Mon Nov 14, 2022 12:27 am
Not ALL variables can be edited. I have noticed that a floating point variable is there to stay. The only way I could edit it (Change it to a non floater) was to delete and start over.
This is intended behaviour because changing between an integer and a floating-point can lead to problems elsewhere in your project. I will look into this and see if there is a better solution - perhaps adding a warning if a user tries to change the variable in this way. Or alternatively I could remove these variable change restrictions if the "Allow errors in flowcharts" option is ticked.

Steve-Matrix
Matrix Staff
Posts: 1253
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 167 times
Been thanked: 277 times

Re: Annoying issue if you have an error in your code

Post by Steve-Matrix »

Steve-Matrix wrote:
Mon Nov 14, 2022 8:58 am
Or alternatively I could remove these variable change restrictions if the "Allow errors in flowcharts" option is ticked.
I've just looked into this fix and it is already there in v9. So if you want to swap to different variable types then first ensure that option is ticked in the "application" tab of "global options".

Post Reply