Digits parameters to be set - see digits - with the following restriction: the format parameter must be a STRING* or char*, and pv must be a global var* pointer. Other parameter types are not accepted.
Versuche doch mal statt "res1" "&res1". Laut Handbuch werden ja nur Pointer auf globale Variablen akzeptiert. Im Rest Deines Codefragments sehe ich keinen Fehler.