Log (string) function isn't working with F11? but works with LOG command

Gng

Hey all

Is your Log function working? Nothing happens for me

Log ("It happened")
msg ("It happened")
Log ("Why no logging?!")

The msg appears but there's nothing in the log window.
but when I use the LOG command another window opens with the correct Log msgs; but I can't type LOG command since the game is in the middle of ShowMenu that doesn't allow the ignore it.
How can I make the F11 log work?


I just tried it and you are right, only the LOG command works.

So I tried to change core function of f11 LOG to the working as intended LOG command using https://github.com/ThePix/quest/wiki/Overriding-Functions, but somehow it didn't work.

The working as intended LOG command

if (not GetBoolean(game, "nohtmllog")) {
  JS.showLog ()
}
else {
  msg ("This game has no in-game log.")
}
game.suppressturnscripts = true

f11 LOG

// request (Log, text)
// Replacing double quotes with 2 single quotes
text = Replace(text, "\"", "''")
// Changing syntax from single quotes to escaped double quotes to allow single quotes in log entries
if (not GetBoolean(game, "nohtmllog")) {
  JS.eval ("if(typeof(addLogEntry)===\"function\"){ addLogEntry(\""+text+"\"); };")
}
JS.eval ("if(!webPlayer && typeof(WriteToLog)===\"function\"){var s = \""+text+"\";WriteToLog(s);}")

Gng

Yes, I tried fiddling with core functions, to no avail


Log in to post a reply.

Support

Forums