【发布时间】:2022-01-09 10:15:57
【问题描述】:
我正在尝试创建一个动态填充我拥有的一组开关的开/关状态的表。以下是我卡住的地方,因为它总是什么都不返回/零? ..
-- retrieved http.request status of 4 binary switches
local P61v = 1
local P62v = 0
local P63v = 1
local P64v = 0
— following table should allow us to look up the status of all associated light by their plug names P61, P62, P63 etc.
local LookupTable = {
P61 = P61v,
P62 = P62v,
P63 = P63v,
P64 = P64v
}
local x = LookupTable[P62]
print(x)
【问题讨论】:
标签: lua