Closed jacob1 closed 12 years ago
stdout.txt is handled by SDL, it WON'T be removed if it has anything in it. If it gets removed, you can be assured there was no error output anyway. Also, errors go to stderr.txt, not stdout.txt
On 19 August 2012 16:03, jacob1 notifications@github.com wrote:
normally, they are in stdout.txt after you close tpt, but that file doesn't stay when there is an error, so there is no way of knowing what went wrong.
— Reply to this email directly or view it on GitHubhttps://github.com/FacialTurd/PowderToypp/issues/134.
I forgot to say, this is with lua scripts. When one has an error, nothing is written into stdout, like it is in tpt. stderr.txt works fine.
Lua output should now be redirected to the console or on-screen log
On 19 August 2012 18:22, jacob1 notifications@github.com wrote:
I forgot to say, this is with lua scripts. When one has an error, nothing is written into stdout, like it is in tpt.
— Reply to this email directly or view it on GitHubhttps://github.com/FacialTurd/PowderToypp/issues/134#issuecomment-7854926.
Ok, I just saw the on-screen log, that's a lot better than before. Maybe my error is in the mouseclick function then, and that's why nothing was showing. (The script works fine in tpt)
Yes, it doesn't have the 81.6 patches for Lua yet.
On 19 August 2012 19:13, jacob1 notifications@github.com wrote:
Ok, I just saw the on-screen log, that's a lot better than before. Maybe my error is in the mouseclick function then, and that's why nothing was showing. (The script works fine in tpt) Does tpt++ only log errors in the step functions?
— Reply to this email directly or view it on GitHubhttps://github.com/FacialTurd/PowderToypp/issues/134#issuecomment-7855324.
I know, I tested it to check after I posted it, and edited the question out. I thought it was possible you added error reporting to everything when re-doing some stuff, but I guess not. You should make a function that allows you to add errors/other info to that, it would be useful in scripts when you do something you aren't supposed to, instead needing to press OK in a prompt.
tpt.log() when used outside the console (i.e in mouse events, etc) will print to the on-screen log
normally, they are in stdout.txt after you close tpt, but that file doesn't stay when there is an error, so there is no way of knowing what went wrong. (I know you wanted better error logging though, maybe a way inside the game to know would be better, without needing to close the game).