Can someone please let me know the reason behind this error? I am punching ranking grid question to hidden multi punch question.
Error: [string "line"]:4: attempt to call global 'rank' (a nil value)
Programming code:
rank = tonumber(rank)
q11_1=tonumber(rank("Q11_001"))
print(q11_1)
sel={}
if in_array("1",q11_1) or in_array("2",q11_1) or in_array("3",q11_1) then
print(option1)
table.insert(sel,"1")
end
print(sel)
setvalue("MRK_Q11",sel)
Any help would be really appreciated! Thank you.
Getting error [string "line"]:4: attempt to call global 'rank' (a nil value)
Moderator: leecollings
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Getting error [string "line"]:4: attempt to call global 'rank' (a nil value)
In line
Code: Select all
rank = tonumber(rank)
In the next code line you try to all rank as a function.
Code: Select all
q11_1=tonumber(rank("Q11_001"))
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Who is online
Users browsing this forum: No registered users and 1 guest