[SOLVED] Can't assign values on field after calling a PHP Method?

Hello.
I’d like to know what i’m missing here.
That’s my code on birth_date (onChange Event) , we are in a form application.

// age calculation
{eta} = EPath::calcolaEta({data_nascita},{data_decesso});
// fiscal code calculation
codiceFisPaz({nome},{cognome},{sesso},{data_nascita},{citta_nascita});

EPath::calcolaEta is a static function of my class.
codFisPaz is a PHP Method :

sc_include_library("sys", "php-codice-fiscale", "AbstractCalculator.php", true, true);
sc_include_library("sys", "php-codice-fiscale", "Calculator.php", true, true);
sc_include_library("sys", "php-codice-fiscale", "Subject.php", true, true);
// Devo controllare che le variabili siano tutte non nulle/vuote prima di eseguire il calcolo.
$params = array($nome,$cognome,$sesso,$data_nascita,$citta_nascita);

if(EPath::checkVars($params)) {
	// Mi ricavo il codice catastale dalla città di nascita.
	$codcat = ep_codcat($citta_nascita);
	$subject = new Subject(
  		array(
    		"name" => $nome,
    		"surname" => $cognome,
    		"birthDate" => $data_nascita,
    		"gender" => $sesso,
    		"belfioreCode" => $codcat
  		)
	);

	$calculator = new Calculator($subject);
	$codiceFiscale = $calculator->calculate();
	sc_master_value('codice_fiscale',$codiceFiscale);
	sc_master_value('codice_paziente', EPath::codicePaziente($codiceFiscale));
}

Pratically, my code (that i tested and worked) does not assign anymore value at the field {eta} when i add my php method (that works in any case). If i “echo” EPath::calcolaEta, returns the exact value i exptect. If i comment the PHP Method, the EPath::calcolaEta returns to work, assigning the value to the field {eta}. I’d like to know…why the runtime assign velue on field doesn’t work in when i add that PHP Method?

Thx in advance.

Alright, i think, i’ve just found out myself what i messed up. Pratically i have to sc_include my libs elsewhere. (I put em in OnScriptInit…).