mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
AddAction basic param checking
This commit is contained in:
@ -19,7 +19,9 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_objectType", "_typeNum", "_parentPath", "_action"];
|
if (!params [["_objectType", "", [""]], ["_typeNum", 0, [0]], ["_parentPath", [], [[]]], ["_action", [], [[]], 11]]) exitWith {
|
||||||
|
ERROR("Bad Params");
|
||||||
|
};
|
||||||
|
|
||||||
// Ensure the config menu was compiled first
|
// Ensure the config menu was compiled first
|
||||||
if (_typeNum == 0) then {
|
if (_typeNum == 0) then {
|
||||||
|
@ -19,7 +19,9 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_object", "_typeNum", "_parentPath", "_action"];
|
if (!params [["_object", objNull, [objNull]], ["_typeNum", 0, [0]], ["_parentPath", [], [[]]], ["_action", [], [[]], 11]]) exitWith {
|
||||||
|
ERROR("Bad Params");
|
||||||
|
};
|
||||||
|
|
||||||
private ["_varName","_actionList"];
|
private ["_varName","_actionList"];
|
||||||
_varName = [QGVAR(actions),QGVAR(selfActions)] select _typeNum;
|
_varName = [QGVAR(actions),QGVAR(selfActions)] select _typeNum;
|
||||||
|
Reference in New Issue
Block a user