Merge pull request #2140 from acemod/addActionParamChecking

AddAction basic param checking
This commit is contained in:
ViperMaul 2015-08-14 10:48:07 -07:00
commit c3f6ee7141
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;