Hi,
when i try to wrap a monitor, i get the error:
MinerControl.lua:5: attemp to call nil
http://pastebin.com/ZfAKV2tF
It only fails when im using the modem at the back
1
Cant wrap a Wireless Modem
Started by gfcwfzkm, Mar 02 2014 08:48 PM
6 replies to this topic
#1
Posted 02 March 2014 - 08:48 PM
#2
Posted 02 March 2014 - 08:49 PM
you wrote peripheral.warp...
#4
Posted 02 March 2014 - 08:56 PM
"warp", "wrap". See the difference? You're even using the correct one in your post.
#5
Posted 02 March 2014 - 09:01 PM
(facepalm) thanks.
By the way, got a little question...
in the code im 'waiting' to receive a message from the Wireless-Modem.
That means the program is "stopped" until it get something. But how can i break this too? like by using a 1 second-timer?
By the way, got a little question...
in the code im 'waiting' to receive a message from the Wireless-Modem.
That means the program is "stopped" until it get something. But how can i break this too? like by using a 1 second-timer?
#6
Posted 02 March 2014 - 09:10 PM
local timeOut = os.startTimer(timeGoesHere) --this will fire an event in the given time, with the id it returns. local tEvent = {os.pullEvent()} if tEvent[1] == "modem_message" then --message code here elseif tEvent[1] == "timer" and tEvent[2] == timeOut then --timeout code here endIm guessing you don't know how tables work, so i'll just put this here aswell.
event = tEvent[1] side = tEvent[2] freqency = tEvent[3] replyFrequency = tEvent[4] message = tEvent[5] distance = tEvent[6]
#7
Posted 02 March 2014 - 10:13 PM
Thanks =)
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users