Call duration error again

Post your questions and help other users.

Moderator: Martin

Post Reply
Lucy
Posts: 225
Joined: 10 Aug 2019 11:24

Call duration error again

Post by Lucy » 28 Nov 2019 05:39

Ok. So i have scripts for incoming and outgoing. They are exact same except glovars different to store seperate values.
My outgoing scripts work a treat and give me:
On init script
-start time and date
-caller id
End script same with duration calculation.

However when i use the scripts on incoming it errors!!??

Code: Select all


   //start script
global_call_start_time_inc = triggertime;
global_contact_incoming = {contact_name};
global_contact_incoming2 = {incoming_number};
 date = getDate();
 global_call_start_inc_date =
 "{date,dateformat,EEEE, dd/MMM/yyyy, hh:mm:ss a}";

  //end script
global_call_end_time_inc = triggertime;
global_talktime = (global_call_end_time_inc - global_call_start_time_inc);
global_talktime_str_inc = getDurationString(global_talktime);
 date = getDate();
 global_call_end_inc_date =
 "{date,dateformat,EEEE, dd/MMM/yyyy, hh:mm:ss a}";

    //ERROR RECEIVED
//28.11.2019 16:31:46.551 [Call inc (end)] End executing action 'Script: //end script global_call_end_time_inc = triggertime; global_talktime = (global_call_end_time_inc - global_call_start_time_inc); global_talktime_str_inc = getDurationString(global_talktime); date = getDate(); global_call_end_inc_date = "{date,dateformat,EEEE, dd/MMM/yyyy, hh:mm:ss a}";' and exception can not apply operation - to values '1574919102106' and '' (Expression: global_call_end_time_inc - global_call_start_time_inc[line 2])
//28.11.2019 16:31:46.552 [Call inc (end)] Flow ends execution due to errors
//28.11.2019 16:31:46.555 [Call inc (end)] Error:
//ch.gridvision.ppam.androidautomagic.simplelang.a.d: can not apply operation - to values '1574919102106' and '' (Expression: global_call_end_time_inc - global_call_start_time_inc[line 2])
	



Lol what simple error am i making in this ever so easy script?

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Call duration error again

Post by Desmanto » 28 Nov 2019 18:08

Your start time is blank. I wonder what happen, that cause the glovar start time is not assigned value properly.
Try to check your starting trigger for the incoming call, use debug dialog to see if the value is assigned properly. Try not add/enable the end trigger first.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Lucy
Posts: 225
Joined: 10 Aug 2019 11:24

Re: Call duration error again

Post by Lucy » 28 Nov 2019 23:25

Ok thanks darlin after work i will have a look... oh yeah i see that in the error😂 i missed that.. thanks

Post Reply