AddAction basic param checking

This commit is contained in:
PabstMirror 2015-08-13 11:54:26 -05:00
parent 1a2b99c76c
commit 6ca3761710
2 changed files with 6 additions and 2 deletions

View File

@ -19,7 +19,9 @@
*/
#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
if (_typeNum == 0) then {

View File

@ -19,7 +19,9 @@
*/
#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"];
_varName = [QGVAR(actions),QGVAR(selfActions)] select _typeNum;