-->
Page 1 of 1

Cannot remove the error message

PostPosted: Mon Mar 12, 2018 6:39 am
by Alberto_2
I am getting the following error message : "Error in line 224: Comparison between string and number!"

But in line 224 I do compare a numerical variable "kkk" with a number. The strange thing is that the variable "kkk" is also compared in other part of the code without any error message. The error is detected inside button branch (gpio7) while the comparison inside onother branch (gpio3) do not report any error.

I did try to use "=" for number and "==" for strings but then I get dozzen errors and the code doesn't work anymore.
Did also try to set kkk =0 at the begining of the code to stress that kkk is numerical but not avail, I continue to get the error all the time I press the button to branch to gpio7.

The program seems to work without any apparent problem, appart the error message. Any suggestion?

Thank you.
Alberto

Re: Cannot remove the error message

PostPosted: Tue Mar 20, 2018 5:50 am
by Electroguard
RX uses gpio03 so is a valid pin, but gpio07 is probably not valid a valid pin (gpio's 6 to 11 are usually reserved for addressing the flash chip).

Re: Cannot remove the error message

PostPosted: Sun Jan 20, 2019 2:42 pm
by heckler
Hi Alberto,

I have experienced the same thing.

Error that there is a "comparison between string and number" even though my code is correct.
I believe it may be a problem that occurs when your code is saved to the module from the editor window.

The only thing I have done to be able to correct it is to delete the line, do a save, and then re-enter the line again and save the corrected code.

I have also experienced an issue where code gets corrupted between a save / edit... such as

tdp = tdp % 10

where the % seems to get changed to garbage.

Did you ever come up with a solution??

hope this helps
dwight

Re: error message "Comparison between string and number"

PostPosted: Sun Jan 20, 2019 6:15 pm
by heckler
In fact I am having this problem right now.
After several saves and trying everything I have just now remarked out the bad line and entered it again on the next line to see if that will fix it.

anybody else have this problem, or solution??

thanks
dwight