---
title: "numpubvars | open.mp"
description: "Counts how many public variables there are in the script."
canonical: https://omp.itsneufox.com/docs/scripting/functions/numpubvars
language: en
---

# numpubvars

## Description

Counts how many public variables there are in the script.

## Returns

The number of public variables declared.

## 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.
-   [existpubvar](https://omp.itsneufox.com/docs/scripting/functions/existpubvar): Checks if a specific public variable exists in the current script.
