log 49

Log some text in the F3 console. This helps a lot with testing custom Lua code. press F3 to open the console and visualize the log


Return value

Return TypeDescription
voidThis function doesn't return anything

Parameters

ParameterTypeDescription
1stringText to display on the logs

Examples

Log simple

log("My code worked so far!")

Log name of the soldier controlled by the player

local soldier = er2.getPlayer()

-- Make sure player's soldier was aquired correctly (maybe player is not spawned)
if soldier != nil then
    log("Soldier name: "..soldier.getName())
end

Back to Scripting API