Multiline console commands?

All development conversation and discussion takes place here

Moderator: Moderator

Post Reply
Message
Author
Nagyhal
Wyrmic
Posts: 282
Joined: Tue Feb 15, 2011 12:01 am

Multiline console commands?

#1 Post 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!
Last edited by Nagyhal on Mon Nov 30, 2015 11:25 pm, edited 1 time in total.

Effigy
Uruivellas
Posts: 931
Joined: Fri Oct 10, 2014 4:00 pm

Re: Multiline console commands?

#2 Post by Effigy »

Have you tried putting all the commands on one line? Not sure if it works, but it's something to try.

Nagyhal
Wyrmic
Posts: 282
Joined: Tue Feb 15, 2011 12:01 am

Re: Multiline console commands?

#3 Post by Nagyhal »

Yep! 8)

Stuntofthelitter
Spiderkin
Posts: 574
Joined: Sun May 12, 2013 7:00 am

Re: Multiline console commands?

#4 Post by Stuntofthelitter »

I don't know how to actually input them directly, but you CAN copy and paste the block in.
<astralInferno> poor stunt
<astralInferno> you suffer so that others may suffer in the intended way

Have a save in need of fixing? Open a ticket, send me a copy of your save: http://www.te4support.org/

Nagyhal
Wyrmic
Posts: 282
Joined: Tue Feb 15, 2011 12:01 am

Re: Multiline console commands?

#5 Post 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.

Post Reply