local strRandomCode = math.random(0,9) .. math.random(0,9) .. math.random(0,9) .. math.random(0,9) .. math.random(0,9)
Values["value_name"].Int = strRandomCode -- set integer value of "value_name" to strRandomCode value
Values["value_name"].String = strRandomCode -- set string value of "value_name" to strRandomCode value
function checkPrivateLeft()
intRandomCode = getObject("Values[RandomCode]"):getInt(VValueInt)
strRandomCode = tostring(intRandomCode)
if getObject("Values[str_private_left]"):getStr(VValueString) == strRandomCode then
getObject("Values[str_private_left]"):setValue(VValueString, strRandomCode .. "(OK)")
getObject("Conditions[PrivateLeftCodeOK?]"):setValue(VConditionValue, true)
else
getObject("Values[str_private_left]"):setValue(VValueString, "WRONG CODE")
end
end
local rand -- empty variable
function checkPrivateLeft()
rand = tostring( Values["RandomCode"].Int )
-- + --
if Values["str_private_left"].String == rand then
Values["str_private_left"].String = rand.." (OK)"
Conditions["PrivateLeftCodeOK?"].ConditionValue = true
else
Values["str_private_left"].String = rand.." (WRONG CODE)"
end
end
local rand -- empty variable
function checkPrivateLeft()
rand = tostring( getObject("Values[RandomCode]"):getInt(VValueInt) )
-- + --
if getObject("Values[str_private_left]"):getStr(VValueString) == rand then
getObject("Values[str_private_left]"):setValue(VValueString, rand .. " (OK)")
getObject("Conditions[PrivateLeftCodeOK?]"):setValue(VConditionValue, true)
else
getObject("Values[str_private_left]"):setValue(VValueString, rand .. " (WRONG CODE)")
end
end
function checkPrivateLeft()
if Values["str_private_left"].String == tostring(Values["RandomCode"].Int) then
Values["str_private_left"].String = tostring(Values["RandomCode"].Int).." (OK)"
Conditions["PrivateLeftCodeOK?"].ConditionValue = true
else
Values["str_private_left"].String = " WRONG CODE"
end
end
function checkPrivateLeft()
if Values["str_private_left"].String == tostring(Values["RandomCode"].Int) then
Values["str_private_left"].String = Values["str_private_left"].String.." (OK)"
Conditions["PrivateLeftCodeOK?"].ConditionValue = true
else
Values["str_private_left"].String = " WRONG CODE"
end
end