mesecons icon indicating copy to clipboard operation
mesecons copied to clipboard

print() output for luacontroller

Open mstram opened this issue 8 years ago • 4 comments

I've just downloaded minetest-0.4.16-win64 and the current mesecons.

Is the print() function supposed to be working ?

If so, where does it output to ? (The chat / screen output would be a nice place (like the lua mod) !

I've enabled "Show debug info" in the Minetest client settings, but that didn't help.

Is there some other setting ?

I took a look at the init.lua script and see that print is actually doing a "safe_print" : print(dump(param)), but where is "dump" supposed to be outputting to ?

The http://dev.minetest.net/dump page is not much help there

mstram avatar Oct 30 '17 23:10 mstram

The dump function converts the given value to a printable string. The print function outputs a string to the server debug log.

ssieb avatar Oct 31 '17 00:10 ssieb

So print() should be working ?

Here is a script I'm trying to run : It works, as far as activating the ports, but no output is showing up in bin\debug.txt

if (event.type == "on" and event.pin.name == "A") then port.c = not port.c print("zop port.c") port.d = not port.c end

I used "zop" for something easy to grep in debug.txt

On 10/30/17, Samuel Sieb [email protected] wrote:

The dump function converts the given value to a printable string. The print function outputs a string to the server debug log.

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/minetest-mods/mesecons/issues/388#issuecomment-340624255

mstram avatar Oct 31 '17 11:10 mstram

On linux you could see the printed messages in the terminal with that you executed minetest. I think, for windows there's a setting to enable some other window but I don't know its name.

Desour avatar Oct 31 '17 12:10 Desour

I think print() output should go to some spot visible to unprivileged users on a remote server, it would really help with debugging. I suggest either the latest print messages should be associated with the luacontroller/luadevice or should be a private message to the owner of the block

programmerjake avatar May 12 '19 01:05 programmerjake