Zubetto Posted August 13, 2015 Posted August 13, 2015 Hello! I'm not very familiar with programming, so hope for understanding) How can I use the function GetDevice(ID) in LUA predicate trigger condition? When I start my mission with this LUA predicate code local dev = GetDevice(20):get_frequency() local tune = (math.abs(dev-116000000)) <= 1999 return tune the following error is occurs: ... attempt to call global 'GetDevice' (a nil value) ... How to make this function being visible in LUA predicate? Please help!
Нупь Posted August 13, 2015 Posted August 13, 2015 MainPanel = GetDevice(0) local dev = MainPanel:get_argument_value(20) local tune = (math.abs(dev-116000000)) <= 1999 Asus Rampage V Extreme X99, i7-5930K, DDR4 16GB Crucial 2133MHz, WD SATA6 1000GB, GeForce Titan Black 6Гб, 23" 1920x1080, CM 1.2кВт, СМ Nepton 280L, TM Warthog Моя карта ТВД Кавказ, Невада https://www.digitalcombatsimulator.com/ru/files/3053906/
Zubetto Posted August 13, 2015 Author Posted August 13, 2015 thank you for quick response, but it seems, will not work, cause GetDevice isn't visible and no matter what arguments I will use
Recommended Posts