Naveen Kumar
Naveen Kumar

Reputation: 325

Decimal point showing error in Lua

I'm using ESPlorer for programming ESP8266.

a = 7.5
print(a)

This lua code shows error "malformed number near '7.5' ". Do I need to add any library or file?

Upvotes: 2

Views: 578

Answers (1)

bluemind
bluemind

Reputation: 1611

Which exact firmware (file) did you flash to the ESP?

I expect you might have used the 'INTEGER' version, which doesn't support floating point arithmetics, use the 'float' firmware version instead.

Upvotes: 3

Related Questions