> ## 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

> Zwraca current executor environment table przez pushing LUA_ENVIRONINDEX. Function nie przyjmuje arguments, zwraca exactly one value i nie ma registered alias. Call-sites w repository uzywaja returned table do odczytu i zapisu shared executor globals takich jak __siApiCache i saveinstance.

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

  ## Zwroty

  <ResponseField name={"environment"} type={"table"}>
    Table obecnie przechowywana w LUA\_ENVIRONINDEX dla tego state.
  </ResponseField>

  ## Przykład

  Read and write values on the current executor environment table.

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

  env.RealDocsValue = "ready"

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