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

Requesting Specific Parameters From Os.pullevent()

Started by justinhtn, 06 November 2013 - 01:33 AM
justinhtn #1
Posted 06 November 2013 - 02:33 AM
I am wondering if it is possible for me to create one variable and retrieve a specific parameter from an os event. Specifically, I don't want to have to create 5 variables just to get a message from another computer using modem.transmit().
Lyqyd #2
Posted 06 November 2013 - 10:59 AM
Split into new topic.

Are… are you serious? You think it's too much work to type an extra three characters to skip a return value? That's got to be the height of laziness. I'm surprised you gathered up the motivation to type out that whole question!

Kidding aside, just throw the return values in a table and index what you want from it:


local event = {os.pullEvent()}
print(event[2])