Skip to main content

getarg

คำอธิบาย​

Get an argument that was passed to a function.

NameDescription
argThe argument sequence number. Use 0 for first argument.
indexThe index (in case the argument is an array).

ส่งคืน​

The value of the argument.

ตัวอย่าง​

SomeFunc(...)
{
printf("%i", getarg(3));
}

public OnFilterScriptInit()
{
SomeFunc(1, 3, 3, 7);
}

// Output: 7. The fourth argument (index 3) is 7.

ฟังก์ชั่นที่เกี่ยวข้องกัน​

  • numargs: Return the number of arguments.
  • setarg: Set an argument.