Page MenuHomeFeedback Tracker

Multiple Mission Parameters: Data Type missmatch
New, WishlistPublic

Description

https://community.bistudio.com/wiki/server.cfg#Arma_2:_Operation_Arrowhead_-_multiple_mission_parameters_configuration

the Value[] takes Integer and Float Data Types.
The default takes Integer only.

Was advised by Dwarden to create a feedback tracker ticket.

Details

Legacy ID
224853403
Severity
None
Resolution
Open
Reproducibility
Always
Category
Scripting
Steps To Reproduce

//Defined in description.ext

// Check value of ParamsArray;

if (!isNil {paramsArray}) then {
hint str(paramsArray);
};

// Case 1:

class Params
{
class MY_Test
{
title = "test";
values[] = {0,1,0.6};
texts[] = {"Disabled","Enabled","Custom_0_6"};
default = 0.6;
};
};

// invoked via #missions to grab default-Value

// results in a Value of "0"

// Case 2:

class Params
{
class MY_Test
{
title = "test";
values[] = {0,1,0.6};
texts[] = {"Disabled","Enabled","Custom_0_6"};
default = 0.5;
};
};

// invoked via #missions to grab default-Value

// results in a Value of "0"

Case #3

// Case 1:

class Params
{
class MY_Test
{
title = "test";
values[] = {0,1,0.6};
texts[] = {"Disabled","Enabled","Custom_0_6"};
default = 0.9;
};
};

// invoked via Mission Rotation with value of 0.6

class Missions
{
class MyMission
{
template="MyMission_BL_OP.Altis";
difficulty="Regular";
class Params { MY_Test = 0.6; };
};

// results in a Value of "0.6"

some more tests:

default = 0.6 1
default = True;
1
default = False; 0
default = 123;
123
default = SeemsIntegerValuesOnly // 0

Additional Information

[14:29:09 | Edited 14:29:28] -[EUTW]- E.C.I.D.: Found this out after a lot of tetsing last night: It is not documented: https://community.bistudio.com/wiki/server.cfg#Arma_2:_Operation_Arrowhead_-_multiple_mission_parameters_configuration the values for value[] can be integer or float, whereas the default value can be integer only. I'm not sure how to add this to the wiki as i am not familiar with editing wikis. whole testing process is here:
[14:29:29] -[EUTW]- E.C.I.D.: [03:20] -[EUTW]- E.C.I.D.:

<<< paramsArray from earlier, bear with me : I think there is a bug in how default value is processed when invoking it via #missions instead of a paramsarray in mission rotation. It seems to round the defaul-value (0.0 to 0.5 == 0) (0.6 to 1.0 ==1) Is it supposed to do that ? What i did to test it you can find here: http://justpaste.it/gjjc I might be wrong - perhaps someone feels like double checking ?
[14:29:46] -[EUTW]- E.C.I.D.: [03:44] -[EUTW]- E.C.I.D.:

<<< Did some more tests: default = 0.5; 0
default = 0.6
1
default = True; 1
default = False;
0
default = 123; 123
default = SeemsIntegerValuesOnly
0

values[] can have float
default can only have integer
[14:30:30] -[EUTW]- E.C.I.D.: perhaps interisting for one of the Devs. Cheers - E.C.I.D. out
[14:30:53 | Edited 14:31:01] Dwarden (David Foltyn): that's normal value[] always indicates array ... see the normal cfg layout
[14:31:10] -[EUTW]- E.C.I.D.: yes, problem is the following :
[14:31:25] -[EUTW]- E.C.I.D.: you set e.g. 0, ,0.1 and 0.9 for 0% 10% and 90%
[14:31:31] -[EUTW]- E.C.I.D.: now that works via rotation
[14:31:43] -[EUTW]- E.C.I.D.: if you define default =0.5 // should be 50%
[14:32:06] Dwarden (David Foltyn): try use different variable name than default
[14:32:07] -[EUTW]- E.C.I.D.: it rounds that value to 0 as the defaults value is a fixed to int and does not allow float
[14:33:21] -[EUTW]- E.C.I.D.: oh i see. So the default is a fixed variable name and not the default return value for the previous defined parameter .. okay, that makes sense i guess
[14:33:49] Dwarden (David Foltyn): not sure, never needed this so can't really vouch
[14:34:41 | Edited 14:35:14] -[EUTW]- E.C.I.D.: okay. so maybe i found a bug, mybe i did not :D thanks anyways - i just thought i point it out.
[14:38:06] Dwarden (David Foltyn): make it ticke on arma 3 feedback tracker or discusss on a3 forums
[14:38:18] -[EUTW]- E.C.I.D.: kk

Event Timeline

ECID edited Steps To Reproduce. (Show Details)Aug 8 2014, 2:49 PM
ECID edited Additional Information. (Show Details)
ECID set Category to Scripting.
ECID set Reproducibility to Always.
ECID set Severity to None.
ECID set Resolution to Open.
ECID set Legacy ID to 224853403.May 7 2016, 7:11 PM
Bohemia added a subscriber: AD2001.Aug 8 2014, 2:49 PM

So, your trying to state that we should be able to use other data types, more than just integers?
values[] doesn't seem to work with floats.

ECID added a subscriber: ECID.May 7 2016, 7:11 PM
ECID added a comment.Aug 8 2014, 6:55 PM

values[] does. via Mission Rotation. It reads correctly values of 0.1, 0.2, 0.5, 0.7, etc.

check the last part of the repro steps i posted. (last 25 lines)

What i am saying is, that if values[] supports Int + float, so should default.

Or if Integers only is preferred, like it set in default, then values[] should only allow int as well.

Or else someone scripting (like me) will have to spent hours to figure why a default float value is not read properly, instead is replaced with 1 or 0 depending on the round();