Page MenuHomeFeedback Tracker

getNumber shouldn't throw error but it does
Closed, ResolvedPublic

Description

As the title says, get number throws errors for some config entries that are simple expressions if they contain non-sqf commands, such as interpolate.

Details

Severity
Minor
Resolution
Not A Bug
Reproducibility
Sometimes
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce

Run this

getNumber(configFile >> "CfgCloudlets" >> "GrenadeWaveSmall" >> "interval")

Event Timeline

Leopard20 created this task.Sep 3 2024, 6:08 PM
Leopard20 changed Reproducibility from N/A to Sometimes.
Leopard20 updated the task description. (Show Details)
dedmen added a subscriber: dedmen.Sep 5 2024, 10:42 AM

Why should it not throw error?
getNumber reads either number, or string as SQF script. If its not SQF script it throws error. That is by design. I don't see a problem here?

simple expressions depend on context. Animation simple expressions have different variables than sound or particle effects. And the values of these variables are different per object.
getNumber doesn't know what environment.

Why should it not throw error?
getNumber reads either number, or string as SQF script. If its not SQF script it throws error. That is by design. I don't see a problem here?

simple expressions depend on context. Animation simple expressions have different variables than sound or particle effects. And the values of these variables are different per object.
getNumber doesn't know what environment.

I'd just never seen it throw. I only noticed this because I was applying it to a config entry that I thought should always be a number.

Leopard20 closed this task as Resolved.Sep 5 2024, 3:35 PM
Leopard20 changed Resolution from Open to Not A Bug.