최현영

Finally Highway congest function Fixed

...@@ -747,6 +747,7 @@ function roadcongest(eventObj, msg){ ...@@ -747,6 +747,7 @@ function roadcongest(eventObj, msg){
747 var jsonForcongest = obj; 747 var jsonForcongest = obj;
748 var number = msg.replace('번', '').trim(); 748 var number = msg.replace('번', '').trim();
749 var iscount = 0; 749 var iscount = 0;
750 + var index = 0;
750 console.log(number); 751 console.log(number);
751 count = 0; 752 count = 0;
752 console.log(count); 753 console.log(count);
...@@ -771,11 +772,14 @@ function roadcongest(eventObj, msg){ ...@@ -771,11 +772,14 @@ function roadcongest(eventObj, msg){
771 } 772 }
772 roadnumberstringLength = roadnumberstring.length; 773 roadnumberstringLength = roadnumberstring.length;
773 if(roadnumberstringLength != 0){ 774 if(roadnumberstringLength != 0){
774 - iscount = (roadnumberstringLength % 5); 775 + roadnumberstring[roadnumberstringLength] = "이상입니다.";
775 - for(var i = 0; i < (5-iscount); i++ ){ 776 + index = (roadnumberstringLength % 5);
777 + if(index != 0){
778 + for(var i = 1; i <= (4-index); i++ ){
776 roadnumberstring[roadnumberstringLength + i] = "Out of range"; 779 roadnumberstring[roadnumberstringLength + i] = "Out of range";
777 } 780 }
778 } 781 }
782 + }
779 783
780 if(roadnumberstringLength == 0){ 784 if(roadnumberstringLength == 0){
781 var Notfoundroadnumberstring = "검색하신 노선에서 발견된 정체구간은 없습니다."; 785 var Notfoundroadnumberstring = "검색하신 노선에서 발견된 정체구간은 없습니다.";
......