Fandom

武装突袭 Wiki

BIS_fnc_param

简体 | 繁體

4,827个页面创建
于此维基上
添加新页面
评论0 Share

您使用了广告屏蔽软件!


Wikia通过广告运营为用户提供免费的服务。我们对用户通过嵌入广告屏蔽软件访问网站进行了使用调整。

如果您使用了广告屏蔽软件,将无法使用我们的服务。请您移除广告屏蔽软件,以确保页面正常加载。

Introduced with Arma 3 version 0.50
  

Click on the images for descriptions

Introduced in

Game:
Arma 3
Version:
0.50

Description

Description:
Load a script parameter. See Functions Library (Arma 3) for detailed description.

Arma 3 logo black.png This function is obsolete since the introduction of param and params.

Syntax

Syntax:
[input,index,(defaultValue,dataTypes,requiredCount)] call BIS_fnc_param;
Parameters:
input: Array - list of params

index: Number - selected index

defaultValue (Optional): Anything - default param (used when param is missing or of wrong type).
You can overload default value by declaring variable BIS_fnc_<functionName>_<index> in Namespace where BIS_fnc_param is called from.
BIS_fnc_paramIn is a variant of the function with overloading disabled.

dataTypes (Optional): Array - list of allowed type examples (e.g. ["",[],0,objNull])

requiredCount (Optional): Number or Array - If value is Array, checks if it has required number of elements
Return Value:
Anything

Examples

Example 1:
_target = [_this, 0, objNull, [objNull,[]], [2,3]] call BIS_fnc_param;

  • If (_this select 0) is not defined, default objnull is used.
  • If (_this select 0) is defined, but is neither of type Object nor Array, error message is logged and default objNull is used.
  • If (_this select 0) and is Array, but it's count is neither 2 nor 3, error message is logged and default objNull is used.

Example 2:
_answer = [_this, 1, 42] call BIS_fnc_param;

  • If (_this select 1) is not defined, default 42 is used.
  • No limit for data types or number of elements exists.

Additional Information

Execution:
call
Multiplayer:
-
See also:

BIS_fnc_paramIn param params

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Notes

Posted: 21:55 Sep 6 2014
ffur2007slx2_5
(A3 1.28) Use BIS_fnc_paramIn to load private path from parent parameters (loaded by BIS_fnc_param) private ["_parent","_child0","_child1"]; _parent = [_this,0,[],[[]]] call BIS_fnc_param; _child0 = [_parent,0,missionNamespace,[ missionNamespace,grpNull,objNull ]] call BIS_fnc_paramIn; _child1 = [_parent,1,"",[""]] call BIS_fnc_paramIn;

Bottom Section

更多维基

随机维基