Entering scripts into cnsole

You can share your Lua Scripts with everybody here.
Post Reply
DomDis
Posts: 33
Joined: Sat Mar 18, 2023 7:44 pm

Entering scripts into cnsole

Post by DomDis »

I'm so out of my realm here but I'm trying to figure it out so I'm not such a nuisance.

I pasted this into the console

Code: Select all

--Signal Start of lua Script in the System Log  c_AddSystemLog(" ", 1)  c_AddSystemLog("Write to the Server log", 1)
Nothing happened so I tried pressing CNTRL M , pasting the same command and press enetr

Code: Select all

--Signal Start of lua Script in the System Log  c_AddSystemLog(" ", 1)  c_AddSystemLog("Write to the Server log", 1)
Still nothing I remove the comment and it works but now I'm wondering how do I run scripts with comment lines in them ?
The client is a Microsoft PC running the latest version of FireFox The server is Ubuntu and WingFTP is the latest stable release
At least now I know why when I was testing some of my scripts, they failed miserableness
FTP
Site Admin
Posts: 2080
Joined: Tue Sep 29, 2009 6:09 am

Re: Entering scripts into cnsole

Post by FTP »

If you use the multiple line mode in Admin Console, press Ctrl+Enter to execute the Lua script. For the single line mode, you can write the lua script in a text editor first, then copy/paste the script into Admin Console, and press Enter to execute it.
DomDis
Posts: 33
Joined: Sat Mar 18, 2023 7:44 pm

Re: Entering scripts into cnsole

Post by DomDis »

FTP wrote: Wed Jun 28, 2023 4:17 pm If you use the multiple line mode in Admin Console, press Ctrl+Enter to execute the Lua script. For the single line mode, you can write the lua script in a text editor first, then copy/paste the script into Admin Console, and press Enter to execute it.
I tried that write in notepad, copy lines to buffer, on the console press cntl and m then paste into the lua window = didn't seem to work
FTP
Site Admin
Posts: 2080
Joined: Tue Sep 29, 2009 6:09 am

Re: Entering scripts into cnsole

Post by FTP »

No, if you copy the script for the text editor, don't switch to the multiple line mode, just press enter to execute it. In the multiple line mode, you need to paste the code line by line.
Post Reply