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

Help (could not think of good title)

Started by houseofkraft, 21 January 2017 - 11:44 PM
houseofkraft #1
Posted 22 January 2017 - 12:44 AM
Hello!

The title sucks, I know :P/>

Anyways, I want to do something like this


local cmd = "help"
if command.cmd.output then
  for k,v in pairs(command.cmd.output) do
     print(v)
  end
end

I'm making a console for my website hosting system in Firewolf and I need to have something like this.

Thanks!
KingofGamesYami #2
Posted 22 January 2017 - 03:00 AM
Try using the value of the 'cmd' variable instead of the string "cmd" when indexing the command table.
Lupus590 #3
Posted 22 January 2017 - 03:27 PM
yami's post as code


command[cmd].output
Edited on 22 January 2017 - 02:28 PM
houseofkraft #4
Posted 23 January 2017 - 11:45 AM
Thanks!