Mr H. 402 Posted August 21, 2019 Using https://community.bistudio.com/wiki/params you can define expected datatypes with an "Array of direct Data Types" eg. {} is CODE, but what's the correct way to check that the parameter is a side ? https://community.bistudio.com/wiki/typeName seems to imply that it's sideUnknown but: params [ ["_units",[],[]], ["_side",WEST,sideUnknown], ["_position",[0,0,0],[],3] ]; Throws an error while params [ ["_units",[],[]], ["_side",WEST], ["_position",[0,0,0],[],3] ]; Does not. And I can't find the right syntax... Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted August 21, 2019 28 minutes ago, Mr H. said: Using https://community.bistudio.com/wiki/params you can define expected datatypes with an "Array of direct Data Types" eg. {} is CODE, but what's the correct way to check that the parameter is a side ? https://community.bistudio.com/wiki/typeName seems to imply that it's sideUnknown but: params [ ["_units",[],[]], ["_side",WEST,sideUnknown], ["_position",[0,0,0],[],3] ]; Throws an error while params [ ["_units",[],[]], ["_side",WEST], ["_position",[0,0,0],[],3] ]; Does not. And I can't find the right syntax... That's because you're not using the proper syntax, default data type expects an array of data types, in your second example you leave out the faulty syntax, so of course it works. This should work: params [["_side",west,[sideUnknown]]]; And hence this: test = [east] call { params [["_side",west,[sideUnknown]]]; _side }; should hold east side in "test" variable. Cheers 1 Share this post Link to post Share on other sites
Mr H. 402 Posted August 21, 2019 Ahhhh that's whar I was missing thanks! 1 Share this post Link to post Share on other sites
Mr H. 402 Posted August 21, 2019 I assume that : params [ ["_units",[],[[]]], ["_side",WEST,[sideUnknown]], ["_position",[0,0,0],[[]],3] ]; is also the correct syntax for the rest 3 Share this post Link to post Share on other sites