Page MenuHomeFeedback Tracker

MP params (paramsArray) rounding values - no more decimals allowed
New, WishlistPublic

Description

you cannot put decimals in Arma 3 description.ext for MP parameters (paramsArray). If you do so, the value will be rounded (0.5 to upper).

in earlier versions you could put values like 0.5, 0.75 for overcast for example. {F20713}

Details

Legacy ID
3313516737
Severity
None
Resolution
Reopened
Reproducibility
Always
Category
Config
Steps To Reproduce

See demo mission.

Else, in a description.ext, paste:

class Params
{
class skipTime
{

		title = "time to skip";
		values[] = {0.5, 1.5, 2.5};
		texts[] = {"1h30", "1h30", "2h30"};
		default = 1.5;

};
};

in init.sqf, paste:
hint str paramsArray;
skipTime (paramsArray select 0);

this will skip 2 hours as paramsArray already converted the value 1.5 to 2 as seen in the hint.

(you can do this in SP as Arma 3 takes paramsArray in consideration.)

Event Timeline

LouMontana edited Additional Information. (Show Details)
LouMontana set Category to Config.
LouMontana set Reproducibility to Always.
LouMontana set Severity to None.
LouMontana set Resolution to Reopened.
LouMontana set Legacy ID to 3313516737.May 7 2016, 3:21 PM
MadDogX added a subscriber: MadDogX.May 7 2016, 3:21 PM

Mass closing ancient tickets with no activity for > 12 months; assume fixed or too trivial.

If this issue is still relevant in current dev build, please re-post.

Re-opening by author request.

still present in 1.26.126789
I am insisting on this one as this is restricting (or making other operations to make it possible for) possible values.

As far as I know ARMA has always only allowed int values as parameter values.

I know, not ideal but if you treat values of paramsArray as indecies then you can have greater flexibility:

class Params
{

class skipTime
{
    title = "time to skip";
    values[] = {0, 1, 2};
    texts[] = {"1h30", "1h30", "2h30"};
    default = 1;
};

};

_skipTimeValues = [0.5, 1.5, 2.5];
skipTime (_skipTimeValues select (paramsArray select 0));

thanks – and I know there are workarounds ;-)
@SilentSpike : it worked in OFP/A1/A2, iirc – and this is why it "shocked" me when it didn't work