Page MenuHomeFeedback Tracker

Linux (Dedicated Server) SQF Random Syntax Conflict
Feedback, NormalPublic

Description

https://community.bistudio.com/wiki/random

In SQF, when using (within the same scope) random syntax-2 prior to random syntax-1, syntax-1 will consistently produce the same result number.

Seems like syntax 1 behaves like syntax 3 in this instance.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Linux x64
Operating System Version
N/A
Category
Engine
Steps To Reproduce

Arma 3 Console version 2.10.149954

Setup:

  1. Obtain access to a Linux dedicated server.
  2. Obtain a mission that allows you to access the debug console while playing.
  3. Upload that mission to and start the server with the mission.

Reproduction Steps:

1. Open the debug console

2. Paste in this script to the console and execute it on the server multiple times:

random [1,5,10];
  • Expected: A random number (between 1 and 10) appears in the result pane

3. Repeat step 2 but replace the current script with the following:

random 10;
  • Expected: A random number (no less than 0 and not greater than or equal to 10) appears in the result pane

4. Repeat step 2 again but replace the current script with the following:

random [1,5,10];
random 10;
  • Expected: A random number (no less than 0 and not greater than or equal to 10) appears in the result pane
  • Observed: The same number consistently appears in the result pane each time it is executed
Additional Information
  • Other syntaxes of random do not seem to cause this issue
  • Placing syntax 3 ahead of syntax 1 produces normal behavior
  • In step 4 of the reproduction steps, you can replace random 10; with selectRandom [1,2,3,4,5]; and it too will produce the same result no matter how many times it is executed
  • This is not reproducible on Windows DS or Windows client

Event Timeline

Ansible2 created this task.Jan 3 2023, 3:22 AM
Ansible2 edited Additional Information. (Show Details)Jan 3 2023, 3:26 AM
Ansible2 edited Steps To Reproduce. (Show Details)Jan 3 2023, 3:54 AM
Ansible2 updated the task description. (Show Details)Jan 4 2023, 12:12 AM
dedmen changed the task status from New to Feedback.Jan 9 2023, 3:47 PM
dedmen added a subscriber: dedmen.

Fixed profiling v11 and next dev

dedmen set Ref Ticket to AIII-55473.Jan 10 2023, 5:55 PM