As the title says... Chat on...

User avatar
By simplesi
#30857 When uploading this I get a warning about ) near to }
Code works as expected but its annoying to have to click on the OK message
Any idea why please?
Simon
Code: Select allgpiolookup = {[0]=3,[1]=10,[2]=4,[3]=9,[4]=1,[5]=2,[10]=12,[12]=6,[13]=7,[14]=5,[15]=8,[16]=0}
--key = gpio, value = nodelua

pin = 2

pin = gpiolookup[pin]
User avatar
By simplesi
#30903 No - its not that one
Code: Select allgpiolookup = {[0]=3,[1]=10,[2]=4,[3]=9,[4]=1,[5]=2,[10]=12,[12]=6,[13]=7,[14]=5,[15]=8,[16]=0}
pin = 2
pin = gpiolookup[pin]


give the same warning
Code: Select allw([[gpiolookup = {[0]=3,[1]=10,[2]=4,[3]=9,[4]=1,[5]=2,[10]=12,[12]=6,[13]=7,[14]=5,[15]=8,[16]=0}]]);
> w([[pin = 2]]);
> w([[pin = gpiolookup[pin]]]);
stdin:1: ')' expected near ']'