0 Molinko Posted September 25, 2017 Posted September 25, 2017 The screenshot resolution is hard to read. Could you post the full code in 'code' tags? Quote
0 fireair Posted September 25, 2017 Author Posted September 25, 2017 2 minutes ago, Molinko said: The screenshot resolution is hard to read. Could you post the full code in 'code' tags? local component = require("component") local excavator = component.ie_excavator local onoff = component.ie_excavator.isActive() local on = component.ie_excavator.setEnabled(true) local excavators = {} local stateIndex = 1 for address in component.list("ie_ex") do excavators[stateIndex]=address print (excavators[stateIndex]) print (onoff) stateIndex = stateIndex+1 excavators.on() end here u go Quote
0 Gorzoid Posted September 25, 2017 Posted September 25, 2017 excavators.on isnt a function did you mean to use component.invoke/component.proxy Quote
0 fireair Posted September 26, 2017 Author Posted September 26, 2017 i did could u please show me how that's done? Quote
0 Gorzoid Posted September 26, 2017 Posted September 26, 2017 component.invoke(address, "setEnabled", true) Or component.proxy(address).setEnabled(true) Quote
heres the error