Guest fsoudbakhsh Report post Posted 12/02/2004 07:26 AM The result of the calculation by evaluation module has one digit after decimal. For example the result of ((150 * 3)/100)+10 = 164.5 Please see below the log file copy. What can I do to enforce evaluation module to have 2 digit after decimal? verisign is rejecting my customer credit card amount because of this problem. The error message I get from verisign is number 4 and this means Invalid amount I need quick resolution for this problem. Thanks for your help. Farzad [Rejected] Playing 230100.25 6 rv replace start: [C:\Program Files\ivg\Scripts\PBPScript\MCAC\voice files\$RV[Language]\RejectCardProcessing.wav] 230100.27 6 rv ns [PathSysVoice]{C:\Program Files\VoiceGuide\system\voice\}[PathApp]{C:\Program Files\VoiceGuide\}[PathDataVm]{C:\Program Files\VoiceGuide\data\}[PathVgSys]{C:\Program Files\VoiceGuide\system\}[scriptsPath]{C:\Program Files\ivg\Scripts\PBPScript\MCAC\starting scrip\MainMenu\}[scriptPath]{C:\Program Files\ivg\Scripts\PBPScript\MCAC\starting scrip\MainMenu}[$RV_STARTTIME]{12/1/2004 10:59:07 PM}[$RV_DEVICEID]{6}[$RV_CIDNAME]{}[PathApp]{C:\Program Files\VoiceGuide\}[$RV_CIDNUMBER]{}[selectLanguage]{2}[Language_Input]{2}[Language]{2}[updateLa guage_RowCount]{1}[scriptEnd_Time]{12/1/2004 10:59:16 PM}[scriptEnd_Goto_Script]{C:\Program Files\ivg\Scripts\PBPScript\MCAC\starting scrip\BuyNewTransferMoneyPhoneCard\BuyNewTransferMoneyPhoneCard.vgs}[scriptEnd_Goto_Module]{retrysetCC1}[scrip Start_Time]{12/1/2004 10:59:16 PM}[scriptStart_CalledFrom_Script]{C:\Program Files\ivg\Scripts\PBPScript\MCAC\starting scrip\MainMenu\MainMenu.vgs}[scriptStart_CalledFrom_Module]{MainMenu}[scriptsPath]{C:\Program Files\ivg\Scripts\PBPScript\MCAC\starting scrip\BuyNewTransferMoneyPhoneCard\}[scriptPath]{C:\Program Files\ivg\Scripts\PBPScript\MCAC\starting scrip\BuyNewTransferMoneyPhoneCard}[retrysetCC1]{1}[retrysetCC1_Input]{0}[retryse CC1]{0}[retrycount]{0}[GetCC]{4111111111111111}[GetCC_PathTaken]{success}[checkC len_Input]{len("4111111111111111") = 16}[checkCClen]{True}[checksumCC]{}[retrysetExp_Input]{0}[retrysetExp]{0}[retryc unt]{0}[GetExp]{0505}[GetExp_PathTaken]{success}[setGetExp_Input]{"0505"}[setGetExp]{0505}[GetExp]{0505}[checkExpLen_Input]{len("0505") = 4}[checkExpLen]{True}[check Exp]{}[ChoosePW]{4000}[ChoosePW_PathTaken]{success}[LanguageEvalu_Input]{2}[Lang ageEvalu]{2}[WavsToPlay]{f4.wav, f0.wav, f0.wav, f0.wav}[confirmPW2PWbyFarsi]{1}[GetAmt]{150}[GetAmt_PathTaken]{success}[checkAmt en_Input]{150>=100}[checkAmtLen]{True}[checkAmtSize1_Input]{150 <= 2000}[checkAmtSize1]{True}[LanguageEvalu_78_Input]{2}[LanguageEvalu_78]{2}[WavsT Play]{f1.wav,fhundred.wav,f50.wav,fdollars.wav,fand.wav,f0.wav,fcents.wav}[confi m2AmtByFarsi]{1}[CalServiceFee_Input]{((150 * 3)/100)+10}[CalServiceFee]{14.5}[ResultServiceFee_Input]{14.5}[ResultServiceFee]{14 5}[AddSerFee&GetAmt_Input]{150 + 14.5}[AddSerFee&GetAmt]{164.5}[AddSerFee&GetAmtResult_Input]{164.5}[AddSerFee&GetAmtResult]{164.5}[LanguageEvalu_77_Input]{2}[LanguageEvalu_77]{2}[WavsToP ay]{f1.wav,fhundred.wav,f60.wav,f4.wav,fdollars.wav,fand.wav,f50.wav,fcents.wav} confirm2AmtByFarsi_76]{1}[VeriSignResult]{4}[EvaluateResult_Input]{4=0}[Evaluate esult]{False} 230100.27 6 rv replace end: [C:\Program Files\ivg\Scripts\PBPScript\MCAC\voice files\2\RejectCardProcessing.wav] 230100.27 6 [Rejected] Playing (C:\Program Files\ivg\Scripts\PBPScript\MCAC\voice files\2\RejectCardProcessing.wav) 230100.28 6 play set playid=262031 230100.38 6 PlaySoundStart ok [C:\Program Files\ivg\Scripts\PBPScript\MCAC\voice files\2\RejectCardProcessing.wav] 230100.38 6 timer clear 230100.38 6 RunModule PLAY end 230100.38 6 wa(9961,26203100) 230100.38 6 callinfo MONITORMODES 230110.38 6 wb(26203100) 230110.44 6 play end current play (playid=262031) 230110.44 6 ScriptEventCode 8001 iLineState=1100 230110.44 6 LsPlayMsg EV_PLAY_FINISHED 230110.44 6 timer set 5 EV_TIMEOUT_REPLAYMSG 230114.45 6 callstate DISCONNECTED 66219 0 0 230114.45 6 ScriptEventCode 9250 iLineState=1101 230114.45 6 LsPlayMsgFinished EV_REMOTEPARTY_DISCONNECT 230114.47 6 rv add [Hangup Time]{12/1/2004 11:01:14 PM} 230114.47 6 Hanging up call... 230114.47 6 RecSoundStop ok 230114.47 6 PlaySoundStop err=0 230114.48 6 timer set 2 EV_TIMEOUT_WAITFORIDLEAFTERLINEDROP 230114.48 6 fnHangupCall end 230114.52 6 linedevstate 2048 0 0 230114.52 6 callstate IDLE 66219 0 0 230114.53 6 WorkingMode@Idle= Share this post Link to post
SupportTeam Report post Posted 12/02/2004 08:37 AM See the "FormatNumber" function which you can use within an Evaluate Expression module. See: http://www.voiceguide.com/vghelp/html/modEvalExpr.htm Share this post Link to post
Guest fsoudbakhsh Report post Posted 12/07/2004 07:50 AM this is the follow up of my previous email, I tried to add below Function to the evaluate module to get the 2 digit after decimal. But unfortunately it doesn’t work. Would be too much to ask to fix the attached VB scrip for me the way it say the 2 digit after decimal? It would be a great help to me if you do that. Thanks Function FormatNumberDemo Dim MyNumber FormatNumberDemo = FormatNumber(MyNumber,4) End Function formateNumberTest.vgs Share this post Link to post
SupportTeam Report post Posted 12/07/2004 09:16 PM You cannot use a vb script: module [MySecant] sets the value of $RV[MySecant] to be 14.5 Then in module [Evaluate 2] you should have the following expression: FormatNumber($RV[MySecant],2) and then in your 'Say Number' module [say Numbers 10] you should speak this RV: $RV[Evaluate 2] Looking at your current script I can see that you are not really grasping how Result Variables work. I'd recommend you spend more time reading the Help file and studying the examples within it. (I've modified your script as per above and am attaching the modified script to this post.) formateNumberTest.vgs Share this post Link to post