This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
lebalusch's profile picture

Darn Modem / wired modem Problem [solved]

Started by lebalusch, 25 May 2015 - 09:24 PM
lebalusch #1
Posted 25 May 2015 - 11:24 PM
Hi Guys and girls,

I have worked on a little project this weekend and got stuck on how to get round using a pre-set and asking the user for input to where the modem is placed. My script (broadcaster) asks it but seems to just not use the input right. Know there is something palm to face worthy here. Would be great if anyone could take a peak and help me out here below is the link to the post and script in question.

http://www.computerc...-range-test-kit

http://pastebin.com/hAHtp36n

Thank You :)/>
Edited on 26 May 2015 - 09:44 PM
Lyqyd #2
Posted 25 May 2015 - 11:40 PM
You're localizing the wrapped modem to the function, so as soon as it ends, the variable is just gone. You can also iterate the sides and check with peripheral.getType(side) or use peripheral.find(type) in more recent versions.
lebalusch #3
Posted 26 May 2015 - 11:44 PM
Thank You such a small thing like that i knew it would be a face palm moment lol