Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DynValue ToString uses InvariantCulture #327

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KiwifruitDev
Copy link

@KiwifruitDev KiwifruitDev commented Oct 7, 2023

Performing this change allows decimal values to concatenate through strings correctly.
When a user's Windows regional format uses , for decimal separation, MoonSharp does not handle it in this instance.
For my purposes, I have a software that uses MoonSharp for FFmpeg operations.
This is a snippet from a Lua script that does not execute correctly:

-- Cut material to whatthe length from random start
local multiplier = (whatthelength*0.75)
local start = functions.randomDouble(0, materiallength - multiplier)
functions.runFFmpeg("-ss " .. start .. " -i \"" .. material .. "\" -t " .. multiplier .. " -c:v libx264 -preset ultrafast -crf 18 -vf scale=" .. options.width .. ":" .. options.height .. ",setsar=1:1,fps=fps=30 -y \"" .. temp2 .. "\"")

The values start and multiplier may not output in a valid format, resulting in this error:

Invalid duration specification for ss: 0,5253521033538923

After these changes were made, the issue no longer occurs.
This may be considered a duplicate or continuation of #295.

Performing this change allows decimal values to concatenate through strings correctly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant