forked from your-land-mirror/yl_speak_up
check parameters in set_variable_to_random_number better
This commit is contained in:
parent
6b6c31e4aa
commit
7896d53dd6
@ -514,6 +514,9 @@ yl_speak_up.custom_functions_r_[ "set_variable_to_random_number" ] = {
|
|||||||
-- set the value of the variable
|
-- set the value of the variable
|
||||||
local n1 = tonumber(r.r_param2)
|
local n1 = tonumber(r.r_param2)
|
||||||
local n2 = tonumber(r.r_param3)
|
local n2 = tonumber(r.r_param3)
|
||||||
|
if(n1 == nil or n2 == nil) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
if(n2 < n1) then
|
if(n2 < n1) then
|
||||||
local tmp = n1
|
local tmp = n1
|
||||||
n1 = n2
|
n1 = n2
|
||||||
|
Loading…
Reference in New Issue
Block a user