GetObjApiDescriptor()

grandMA3 ユーザマニュアル » プラグイン » Lua 関数 - Object-Free API » GetObjApiDescriptor() Version 2.2

説明

GetObjApiDescriptor 関数は、すべての object Lua 関数の説明を含むテーブルを返します。これらは単なる説明で、関数に実際の機能はありません。テーブルはソートされていません。

引数

この関数は、引数を受け取りません。

戻り値

  • table:
    返されたテーブルには、以下の3つの要素が含まれています。
    • string:
      API関数名です。
    • string:
      APIの引数の説明です。
    • string:
      APIの戻り値の説明です。

返されたテーブルの内容を出力します。

Lua
return function ()
  -- This returns information about all the Lua "object" functions.
  -- GetObjApiDescriptor() returns a table with all the functions. 
  -- Each table element is another table with the name, argument description, and return description.
    for key,value in ipairs(GetObjApiDescriptor()) do
      if value[1] ~= nil then
        Printf("Api " .. key .. " is: " .. value[1])
      end
      if value[2] ~= nil then
        Printf("Arguments: " .. value[2])
      end
      if value[3] ~= nil then
        Printf("Returns: " .. value[3])
      end
        Printf("---------------------------------------")
      end
end