esp8266 / Basic

Basic Interpreter for the ESP8266
http://esp8266basic.com
258 stars 217 forks source link

msgreturn always returns "No MSG Branch Defined" #26

Closed RobertoNagy closed 7 years ago

RobertoNagy commented 7 years ago

Running the MSG URL explains the msgreturn always returns "No MSG Branch Defined"

mmiscool commented 7 years ago

This should be corrected in current version. If it is not reply to this with a small example program so I can test and get rid of the bug.

RobertoNagy commented 7 years ago

Using this example:

msgbranch [mybranch] print "set the branch" wait

[mybranch] myColorVar = msgget("color") print myColorVar let myReturnMsg = "You Entered " & myColorVar msgreturn myReturnMsg wait

and using: wget http://192.168.4.1/msg?color=blue -q -O - or in a web browser: http://192.168.4.1/msg?color=blue the response is: No MSG Branch Defined "blue" pops up at http://192.168.4.1/input? address.

mmiscool commented 7 years ago

Fixed in latest web sockets branch. New build tonight

gdelconti commented 5 years ago

Hello , this bug is still present under ESP Basic 3.0.Alpha 69. Simply add one "delay x" statement to the above example, like this:

msgbranch [mybranch] print "set the branch" wait

[mybranch] myColorVar = msgget("color") print myColorVar delay 10 ' JUST ADD THIS LINE let myReturnMsg = "You Entered " & myColorVar msgreturn myReturnMsg wait