General area when it fits no where else

Moderator: Mmiscool

User avatar
By ardhuru
#50676 Hello!

I am trying to upload 2 parameters to Thingspeak, as per viewtopic.php?f=45&t=8976&start=4

Code: Select all t = dht.temp()
    h = dht.hum()
    c = c+1
    if c = 15 then
        c = 0
        thing = t & "&field2=" & h
        serialprintln thing
        sendts ("84xxxxxxxxxxxxCM",1,thing)
    endif 


I keep getting "Failed to reach end of input expression, likely malformed input
Syntax error
Halted at line 67";

line 67 is the sendts line.

I also tried the basic command with just one parameter to be uploaded, same result.

I am using v3Alpha 11. Has something changed since this mentioned thread? What am I doing wrong?

Thanks in advance, folks!
User avatar
By bugs
#50686 My working program does this:-
..................
skey$ = "CExxxxxxxxxxxD1"
tsnum$ = "2"
tsdata$ = str(curr)
sendts(tskey$, tsnum$,tsdata$)
......................

Maybe try using "1" for the field instead of 1?
User avatar
By ardhuru
#50690 Bingo!

Thank you so much, Bugs!

The "1" worked. And also had to remove the space between sendts and the opening bracket.

Would'nt it be lovely to have a document that lists these subtle gotchas!!

Thanks again.