Hi If fopen was unsuccessful it returns a 0. So fprintln in that case receives an integer as first argument. Check if the file theta_wainer.out exists in the expected folder. (Probably not) Rob Van: The ox-users list is aimed at all Ox users <[log in to unmask]> Namens "Hyunju Kim" Verzonden: woensdag 23 mei 2018 07:28 Aan: [log in to unmask] Onderwerp: type error in argument 1 Hello, I'm new to Ox program I got code from the other to calculate wainer et al(2001)'s augmented subscore using IRT, but when I hit the run button, this message pops up. [Ox Console version 7.20 (Windows/U) (C) J.A. Doornik, 1994-2017 This version may be used for academic research and teaching only fprint(): type error in argument 1; expected: file, found: int Runtime error: argument error Runtime error occurred in main (89), call trace: C:\Program Files (x86)\OxMetrics7\ox\samples\wainer.ox (89): main] I can't figure out what's wrong. This code was first written in versions 3.1. Do I have to change some codes to use in 7.20 version? For the security, I didn't put par and dat file. Best regards, Hyunju Kim [Afbeelding verwijderd door afzender.]