Log in

View Full Version : Logging when file path is too long the truncation is at wrong end, imo



Varsuuk
April 29th, 2021, 03:57
I get this:


[4/28/2021 10:47:38 PM] [ERROR] Script execution error: [string "scripts/rulesets/white_box/classes/data_cla..."]:254: attempt to compare number with string
[4/28/2021 10:51:30 PM] Campaign saved.


I know one can comment that the path is too long etc. But if I was gonna log, I'd want the rightmost portion/leaf of the earth to appear at the least for those that use big words (and honestly, this path wasn't SO long...)

:)

I can GUESS the file id data_class_cleric.lua" of course - but it's gonna happen again somewhere else and probably harder to detect.

Moon Wizard
April 29th, 2021, 04:38
That is something internal to the Lua engine itself (which is a binary DLL we use, not build ourselves); so you'll have to shorten your paths.

Regards,
JPG

LordEntrails
April 29th, 2021, 05:28
Just don't make any error when you code... :O

Just kidding. But yea, you're right, too bad it's a LUA thing and not a Moon thing :)