---
title: "existpubvar | open.mp"
description: "Checks if a specific public variable exists in the current script."
canonical: https://omp.itsneufox.com/docs/scripting/functions/existpubvar
language: en
---

# existpubvar

## Description

Checks if a specific public variable exists in the current script.

| Name | Description |
| --- | --- |
| const name\[\] | The public variable's name. |

## Returns

Does the variable exist? (true/false)

## Related Functions

-   [getpubvar](https://omp.itsneufox.com/docs/scripting/functions/getpubvar): Gets a specific public variable from the current script.
-   [setpubvar](https://omp.itsneufox.com/docs/scripting/functions/setpubvar): Sets a specific public variable in the current script.
-   [numpubvars](https://omp.itsneufox.com/docs/scripting/functions/numpubvars): Counts how many public variables there are in the script.
