libram
    Preparing search index...

    Function getPlayerIdFromName

    Get the player id from a player name (if it exists)

    the name of the player

    Pass "throw" to throw an error if the player is not found, or "return-null" to return null

    the player id if the player exists, or handles according to onMissing

    • Get the player id from a player name

      Parameters

      • name: string

        the name of the player

      • OptionalonMissing: "throw"

        Pass "throw" or omit to throw an error if the player is not found

      Returns number

      the player id, or throws if no such player exists

    • Get the player id from a player name (if it exists)

      Parameters

      • name: string

        the name of the player

      • onMissing: "throw" | "return-null"

        Pass "throw" to throw an error if the player is not found, or "return-null" to return null

      Returns number | null

      the player id if the player exists, or handles according to onMissing