> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# getgenv

> Gibt die current executor environment table zurück, indem LUA_ENVIRONINDEX gepusht wird. Die function nimmt keine arguments, gibt exactly one value zurück und hat keinen registered alias. Call-sites im repository verwenden die returned table, um shared executor globals wie __siApiCache und saveinstance zu lesen und zu schreiben.

<div className="real-function-page">
  ```lua theme={null}
  getgenv(): table
  ```

  ## Rückgaben

  <ResponseField name={"environment"} type={"table"}>
    Die table, die für diesen state aktuell in LUA\_ENVIRONINDEX gespeichert ist.
  </ResponseField>

  ## Beispiel

  Read and write values on the current executor environment table.

  ```lua theme={null}
  local env = getgenv()

  env.RealDocsValue = "ready"

  print(getgenv().RealDocsValue)
  ```
</div>
