-
Notifications
You must be signed in to change notification settings - Fork 0
SWBF1 print debugging (PC)
BAD-AL edited this page Sep 15, 2021
·
1 revision
BF1's print statements do not go to the BFront.log file, errors do get printed though.
If you want to debug with print statements you can put the following code in your addme or mission file to aide in debugging. Keep in mind that the log may not update until the game exists.
debug_log_name = "BFrontDebug.log"
debug_log = openfile(debug_log_name, "w+")
old_print = print
print = function( arg1, arg2, arg3, arg4)
local print_this = arg1 .. (arg2 or "" ) .. (arg3 or "") .. (arg4 or "") .. " \n"
write(debug_log, print_this)
flush()
old_print(arg)
end
print("This goes to the 'BFrontDebug.log' file now.")