Tell me what you want, What you really, really want.

Moderator: Mmiscool

User avatar
By Mmiscool
#35405 The basic interpreters parser is not that sophisticated. Your code needed spaces between each part of the let command.

You can also do it like so
Code: Select allbla = "Some text " & "Some more text"


Code: Select allcls
setupemail mail.smtp2go.com 2525 ?????@yahoo.com ???????
button "Send Email" [SendEmail]
button "Exit " [TestExit]
wait
[SendEmail]
let body = 25
email 0123456789@vtext.com ????@yahoo.com testSubject body
wait
[TestExit]
end
User avatar
By heckler
#35406 Ok I think I was assigning the "body" variable wrong.

I tried ...
Code: Select alllet body  = "the temperature is 52 degrees"


and it worked!!

So please tell me how to combine several variables along with static text to create a sentence.

something like ...

Code: Select allbody = "the temperature is " + tempval + "degrees, at local time" + hour + ":" + min


to end up with "the temperature is 27 degrees, at local time 11:30"

although I am sure that is wrong but that is a big question for me is how to combine variables and static text.
User avatar
By Mmiscool
#35407 Unfortunately at the moment it can only operate on 2 things at time. this is the same for all of the math and string commands. To make a longer string you might do some like the following.

Code: Select allbody = "the temperature is " & tempval
body = body & "degrees, at local time"
body = body & hour
body = body &  ":"
body = body &  min
 
User avatar
By heckler
#35409 That is awesome.
I think i asked my second question before you replied...

I'll give your guidance a try.

This espbasic is lightyears ahead of lua or any other code I have tried to use to get a little IOT sensor up and running! In terms of stability, ease of understanding, functionality, etc.

I just went back to your web site and made a donation.
and would encourage others to do the same if they are getting working results (or just having fun)!
I wish I could have entered a comment along with the donation
thanks so much!
dwight