check parameters in set_variable_to_random_number better

This commit is contained in:
Sokomine 2025-06-09 02:19:58 +02:00
parent 6b6c31e4aa
commit 7896d53dd6

View File

@ -514,6 +514,9 @@ yl_speak_up.custom_functions_r_[ "set_variable_to_random_number" ] = {
-- set the value of the variable
local n1 = tonumber(r.r_param2)
local n2 = tonumber(r.r_param3)
if(n1 == nil or n2 == nil) then
return false
end
if(n2 < n1) then
local tmp = n1
n1 = n2