# engineGetShaderErrors (Client)

> Lists the errors from the last compile of a shader made with `engineCreateShader`.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Materials and shaders
- **URL**: https://wiki.mymp.gg/en/engineGetShaderErrors

## Syntax

```lua
table engineGetShaderErrors(shader shader)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `shader` | `shader` | The shader. |

## Returns

A list of strings shaped `file:line: message`. Empty when there was no error.

## Example

```lua
local shader = engineCreateShader("shaders/water.shader")

addEventHandler("onClientAssetLoad", shader, function(loaded)
    if not loaded then
        outputDebugString(table.concat(engineGetShaderErrors(shader), "\n"))
    end
end)
```

## See also

- [engineCreateShader (Client)](https://wiki.mymp.gg/en/engineCreateShader.md): Creates a shader from a .shader file or from its source text. The shader compiles in the background.
- [onClientAssetLoad (Client)](https://wiki.mymp.gg/en/onClientAssetLoad.md): Fired once when an asset a script started loading in the background is ready, or has failed.
