logo elektroda
logo elektroda
X
logo elektroda

Errors when uploading a program to ESP8266 in Esplorer IDE - how to fix them?

ka_3 2562 5
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 15891304
    ka_3
    Level 16  
    Trying to upload some sample software to ESP
    Code: Lua
    Log in, to see the code


    I'm using the Esplorer IDE, the problem is that during uploading there are bugs that tell me very little about what is wrong.
    eg:
    stdin:2: unexpected symbol near '<'
    stdin:2: '=' expected near 'ifi'
    stdin:2: ')' expected (to close '(' at line 1) near 'config'
    
    

    How do I know which line is involved?
  • ADVERTISEMENT
  • #2 15891464
    piotrva
    VIP Meritorious for electroda.pl
    You are missing a lot of brackets ;)
  • ADVERTISEMENT
  • #3 15891584
    ka_3
    Level 16  
    Where, for example? Esplorer could not be so good and point out to me which line is missing?
  • ADVERTISEMENT
  • #4 15892451
    piotrva
    VIP Meritorious for electroda.pl
    And sorry, it's not c just some weirdness, it's I don't know what it's about :)
  • ADVERTISEMENT
  • #5 15893258
    piotr411
    Level 22  
    Wrote the Editor where the error was, pointed out that it was wrong in the if condition.

    1. You don't need to use parentheses in the condition
    2. There was a space missing in if(stste ==1)......
    should be if state==1

    Added after 2 [minutes]:

    piotrva wrote:
    As sorry, it's not c just some weirdness, then I don't know what it's about :)


    LUA is a quirky C ;) that's why there are unnecessary brackets for anyone ;)
  • #6 15894438
    piotr411
    Level 22  
    Did you find an error in Timer 1?

    The error relates, as I wrote above, to the IF condition as the editor wrote to you about.
    You must remember that every IF condition ends with an END. this is what you missed.
    LUA if it detects an error of missing end or parenthesis this is how it presents your carelessness, and it clearly wrote the error in IF

    Code: Lua
    Log in, to see the code


    For the future, if you write programs especially in C or LUA, and these are very silly languages, keep your writing aesthetic and use indentation. It will be easier to see what is missing, as such mistakes are not difficult to make.
    You can now see, END Timer 1 and the IF condition
ADVERTISEMENT