I'm not really a hero of variables but you try to print an int with %s, isn't %d the right way?