Newby and need assistance to this:
Followed functions to simplify looking up geographic names from the examples with a little modification. However, encounter error: Invalid function call (number of arguments do not agree)
function string LookupGeographyName(province, municipal,barangay)
GEOCODE_PROVINCE = province;
GEOCODE_MUNICIPAL = municipal;
GEOCODE_BARANGAY = barangay;
GEOCODE_EA = notappl;
if loadcase(LMIS_GEOCODE_DICT, GEOCODE_PROVINCE, GEOCODE_MUNICIPAL, GEOCODE_BARANGAY, GEOCODE_EA) then
LookupGeographyName = strip(GEOCODE_AREA_NAME);
else
LookupGeographyName = "<Invalid Geocode>";
endif;
end;
red dot point to this line:
function string LookupProvinceName(province)
LookupProvinceName = LookupGeographyName(province, notappl);
end;
Invalid function call (number of arguments do not agree) using user-defined function
-
- Posts: 6
- Joined: July 25th, 2018, 10:56 pm
Re: Invalid function call (number of arguments do not agree) using user-defined function
The problem is just what the error message says. Your function LookupGeographyName expects three arguments: province, municipal and barangay. However when you call the function you are only supplying two arguments: province and notappl. The number of arguments needs to match.
-
- Posts: 6
- Joined: July 25th, 2018, 10:56 pm