---
title: "argvalue | open.mp"
description: "获取命令行参数的数值类型值"
canonical: https://omp.itsneufox.com/zh-CN/docs/scripting/functions/argvalue
language: zh-CN
---

# argvalue

## 描述

获取通过双破折号(--)传递的数值类型参数值。

| 参数 | 说明 |
| --- | --- |
| skip = 0 | 需要跳过的同名参数数量（默认 0） |
| const argument\[\] = "" | 参数称（包含`-`或`/`前缀） |
| &value = cellmin | 存储参数值的整型变量（默认 cellmin 表示未初始化） |

## 返回值

**true** - 成功找到带数值的参数

**false** - 参数不存在或未包含数值

## 注意事项

技巧

参数索引计算包含所有独立参数。例如：

在 `--load test --run` 中，参数 `--run` 的索引值为 `2`。

## 相关函数

-   [argcount](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/argcount): 获取命令行参数总数
-   [argindex](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/argindex): 通过索引获取参数名称
-   [argstr](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/argstr): 获取参数的字符串类型值
