Page MenuHomeFeedback Tracker

[Feature Request] evaluateSimpleExpression command
New, NormalPublic

Description

Arma 3 supports "simple expressions" which are used in configs quite a lot. Unfortunately, the getNumber command cannot evaluate them. So I would like to request a command that does this.

variables evaluateSimpleExpression STRING or CONFIG

which evaluates a simple expression either from the string form or from the text config entry.

Example:

[["x", 1], ["y", 2]] evaluateSimpleExpression "pow(x + 1, y)"

if a variable is undefined, no error should be produced and the variable should be set to 0:

[] evaluateSimpleExpression "x + y" // should return 0 without any errors

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Scripting

Event Timeline

Leopard20 created this task.Sep 1 2024, 5:03 PM
Leopard20 updated the task description. (Show Details)Sep 1 2024, 5:14 PM
Leopard20 updated the task description. (Show Details)
Leopard20 updated the task description. (Show Details)
h- added a subscriber: h-.Sep 2 2024, 2:50 PM