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

Send command code with Normal Pc

Started by Scre4M, 01 July 2015 - 07:23 PM
Scre4M #1
Posted 01 July 2015 - 09:23 PM
normal computer code:

rednet.open("top")
rednet.send(id,"tp")
rednet.send(id,"@p 1 2 3")
————————-
command computer code:

rednet.open("top")
i,x = rednet.receive()
i,y = rednet.receive()

commands.x(y)
————————
but it did't work pls help :(/>

problem= commands.x(y)===>/x @p 1 2 3

how i fix it ?

sorry for bad eng :/
flaghacker #2
Posted 02 July 2015 - 07:31 AM
It should be

commands[x](y)
because commands.x looks for the command "x".

Another possibility is

commands.exec(x .. " " .. y)
And you coould also send the entire command at once this way.
Edited on 02 July 2015 - 05:31 AM