Page 1 of 1

What’s Log(“credible distant frontal threat”,CredibleFrontalThreat); for?

Posted: Wed Oct 05, 2022 8:14 am
by locustmustdie
Reading Towton_Y.bsf
Can’t figure out what it was for?
It should have returned a value by log();However it seems never be called by any other functions;,if()s,for()s,neither by any UniversalVars.
Or perhaps merely a logfile-export that have no effect for AI movements itself? It happened in Loja_C.bsf too.
Sorry,it might be a dumb question,but I haven’t coded after graduation until this game.

Re: What’s Log(“credible distant frontal threat”,CredibleFrontalThreat); for?

Posted: Wed Oct 05, 2022 9:58 am
by rbodleyscott
locustmustdie wrote: Wed Oct 05, 2022 8:14 am Reading Towton_Y.bsf
Can’t figure out what it was for?
It should have returned a value by log();However it seems never be called by any other functions;,if()s,for()s,neither by any UniversalVars.
Or perhaps merely a logfile-export that have no effect for AI movements itself? It happened in Loja_C.bsf too.
Sorry,it might be a dumb question,but I haven’t coded after graduation until this game.
Log() is not an arithmetical function and does not return a value, it just writes something to the Debug Log. Primarily for my use when debugging the game.

If you are trying to mod scripts, you should set the game to run in Debug Mode, by putting the line

DEBUGMODE 1

in

/Documents/My Games/FieldOfGloryMedieval/User.txt

You can then see the debug log in game by pressing f6.

If the debug log comes on automatically without clicking f6, it means there has been a script error - you should be able to find the error by scrolling back through the log - the error message will be prefaced by **

This in-battle Debug Log is separate from the error logging into error.log in /Documents/My Games/FieldOfGloryMedieval. You can write to that using DebugLog("string");, or DebugLogY( "string", param1); or DebugLogX("string", param1, param2, param3, param4);

where the params are integers or integer variables.

Re: What’s Log(“credible distant frontal threat”,CredibleFrontalThreat); for?

Posted: Thu Oct 06, 2022 12:11 am
by locustmustdie
Thanks,Richard.