# Module `StdLib.Game`

The game module.

## Functions

fail_if_missing (var[, msg="missing value"]) | Print msg if specified var evaluates to false.
get_player (mixed) | Return a valid player object from event, index, string, or userdata
get_force (mixed) | Return a valid force object from event, string, or userdata
print_all (msg[, condition]) | Messages all players currently connected to the game.

## Functions

fail_if_missing (var[, msg="missing value"])
  Print msg if specified var evaluates to false.

  ### Parameters:

  - var Mixed variable to evaluate
  - msg string message (default "missing value")
get_player (mixed)
  Return a valid player object from event, index, string, or userdata

  ### Parameters:

  - mixed string, number, LuaPlayer or event

  ### Returns:

  LuaPlayer a valid player or nil
get_force (mixed)
  Return a valid force object from event, string, or userdata

  ### Parameters:

  - mixed string, LuaForce or event

  ### Returns:

  LuaForce a valid force or nil
print_all (msg[, condition])
  Messages all players currently connected to the game. > Offline players are not counted as having received the message. If no players exist msg is stored in the `global._print_queue` table.

  ### Parameters:

  - msg string the message to send to players
  - condition nil or boolean the condition to be true for a player to be messaged (optional)

  ### Returns:

  uint the number of players who received the message.

generated by LDoc 1.4.6 Last updated 2018-06-07 12:58:23