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 Type | Description |
---|---|
void | This function doesn't return anything |
Parameters
Parameter | Type | Description |
---|---|---|
1 | string | Text 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