Page 1 of 1
ApplicPtr and ApplicObj
Posted: Fri Oct 03, 2008 8:16 am
by richardali
What is ApplicPtr? and ApplicObj?
Can i convert a value to these values?
thanks
Re: ApplicPtr and ApplicObj
Posted: Sun Oct 19, 2008 11:59 pm
by Yukiko
Where do those names appear?
Re: ApplicPtr and ApplicObj
Posted: Thu Oct 30, 2008 10:37 am
by richardali
Here:
Script Error in 'scripts/ai/animaltrainer.ecl' PC=3237:
Call to function GetConfigStringArray:
Parameter 0: Expected datatype ApplicObj, got datatype Error
Script Error in 'scripts/ai/merchant.ecl' PC=4455:
Call to function GetConfigStringArray:
Parameter 0: Expected datatype ApplicObj, got datatype Error
in debug.log
thanks
Re: ApplicPtr and ApplicObj
Posted: Thu Oct 30, 2008 11:53 am
by CWO
Basically what is happening here is parameter 0 (the first parameter you're passing to GetConfigStringArray()) is expected to be a configfile element but its not, its an error. Now you need to trace back why you're getting this error, likely the FindConfigElem() before it is returning an error.
small example:
Code: Select all
var myconfig := ReadConfigFile("::myconfig");
var elem := FindConfigElem(myconfig, "myelement"); <--- This is likely returning an error. So the variable 'elem' is now an Error.
var array := GetConfigStringArray(elem, "stringarray"); <-- GetConfigStringArray() wants the element as the first parameter which is an ApplicObj datatype, but since elem is an error, its getting datatype Error.
So basically it is telling you in a very short way that it wants an ApplicObj as the first parameter (in this case its a configfile element) but its being given an error so it throws that to debug.log. You're not looking for a way to convert something to these values, you're looking at why you're getting something different than those values.