Clear log and reset score

All discussions & material related to Command's Lua interface

Moderators: RoryAndersonCDT, michaelm75au, angster, MOD_Command

Post Reply
User avatar
nukkxx5058
Posts: 3141
Joined: Thu Feb 03, 2005 2:57 pm
Location: France

Clear log and reset score

Post by nukkxx5058 »

Hello,

How do you force clearing the log and reset scores (all sides + expenditures) when loading a scenario ?

I can see the methods below in the documentation but no idea how to use them:

- ResetLossExp method Clears the loss and expenditure logs in scenario
- ResetScore method Clears the score and log in scenario

Thank you
Winner of the first edition of the Command: Modern Operations COMPLEX PBEM Tournament (IKE) (April 2022) :-)
musurca
Posts: 168
Joined: Wed Jul 15, 2020 10:06 pm
Contact:

RE: Clear log and reset score

Post by musurca »

They are methods, which means that they’re member functions belonging to the Scenario object. To call them, you have to first get a valid Scenario, like so:

local scenario = VP_GetScenario()

—reset the losses and expenditures
scenario:ResetLossExp()

— reset the score
scenario:ResetScore()
User avatar
nukkxx5058
Posts: 3141
Joined: Thu Feb 03, 2005 2:57 pm
Location: France

RE: Clear log and reset score

Post by nukkxx5058 »

Excellent !! Thank you ! [:)]
Winner of the first edition of the Command: Modern Operations COMPLEX PBEM Tournament (IKE) (April 2022) :-)
Post Reply

Return to “Lua Legion”