# `QuakeServer.Builtins.Write`
[🔗](https://github.com/jaman/quake_server/blob/v0.1.0/lib/quake_server/builtins/write.ex#L1)

The message-writing builtins (`WriteByte` to `WriteEntity`, numbers 52 to 59, and
FTE's `WriteFloat`, `WriteInt` and `WriteUnterminatedString`), which append bytes to a
message in FTE's encodings.

The first argument names the destination: 4 (`MSG_MULTICAST`) builds the message the
next `multicast` sends, 5 (`MSG_ENTITY`) the entity update `SendEntity` is writing;
every other destination reaches the one player through the server's message stream,
which `QuakeServer.Messages` reads back.

Coordinates are eighths of a unit in 16 bits and angles 256ths of a turn in a byte, or,
on a server started with `coords: :float`, 32-bit floats and 65536ths of a turn in 16
bits; eighths and turns are rounded half away from zero, as FTE's `MSG_ToCoord` and
`MSG_WriteAngle` round them.

# `append`

```elixir
@spec append(QuakeServer.Server.t(), integer(), binary()) :: QuakeServer.Server.t()
```

Append `bytes` to destination `destination`.

# `coord`

```elixir
@spec coord(QuakeServer.Server.t(), number()) :: binary()
```

A coordinate as `WriteCoord` writes it on `server`.

# `coords`

```elixir
@spec coords(QuakeServer.Server.t(), {number(), number(), number()}) :: binary()
```

Three coordinates as three `WriteCoord`s write them on `server`.

# `write`

```elixir
@spec write(QuakeServer.Server.t(), 52..59 | integer() | String.t(), QuakeC.value()) ::
  QuakeServer.Server.t()
```

Append `value` written by builtin `number` to the destination the call names.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
