Page 1 of 1

Multiline console commands?

Posted: Mon Nov 30, 2015 8:01 pm
by Nagyhal
Is it possible to input multi-line console commands in the Lua console? e.g.:

Code: Select all

for i=1, 5 do
  game.log("Hello Eyal!)
end
I always heard from other people that you could, but it never worked for me. And I always had the feeling it was a Windows / Linux thing (I'm on Windows.)

I know you can still create nice complex loop structures (EDIT: on just one line) using the semicolon syntax, but they are rather hard to work with compared to a nicely tabbed multi line format.

Well, thanks for any help you can offer. Even if this is a simple question with a simple answer (most likely "no" :mrgreen: ), I couldn't find any reference to it in the forums so this will help anybody out there looking to know in future. Cheers!

Re: Multiline console commands?

Posted: Mon Nov 30, 2015 9:58 pm
by Effigy
Have you tried putting all the commands on one line? Not sure if it works, but it's something to try.

Re: Multiline console commands?

Posted: Mon Nov 30, 2015 11:24 pm
by Nagyhal
Yep! 8)

Re: Multiline console commands?

Posted: Tue Dec 08, 2015 4:19 am
by Stuntofthelitter
I don't know how to actually input them directly, but you CAN copy and paste the block in.

Re: Multiline console commands?

Posted: Fri Aug 19, 2016 12:11 am
by Nagyhal
Yep, this is something I do all the time, now - writing long sequences of commands in Sublime and then pasting them into the log!

Thanks for the help, guys!

It works out far better really because the silly log isn't persistent and is impossible to copy from anyway, so if I want to re-use some test code after a restart this is the only way to go.