-
-
Notifications
You must be signed in to change notification settings - Fork 7
F.A.Q.
LotuxPunk edited this page Jan 29, 2019
·
5 revisions
You probably do an io.read() or event.pull("chat_message") to get an information. So, in LUA when you do a read you gonna get a string value. You have to convert your variable to a number.
//OpenComputers
local stringValue = event.pull("chat_message")
//Computercraft
local stringValue = io.read() // for example "5"
//Cast the string to number
local numberValue = tonumber(stringValue) // "5" is converted to 5