The exit status (errorlevel) is 0 if PHost successfully performed the function you requested. When you specified -c, exit status 0 means everything is okay.
PHost returns exit status 1 when there is a permission problem with the game or root directory, or when you used -d or -t on a newly-mastered game.
PHost returns exit status -1 when it encountered a different error (like running out of memory, lacking a file), or when an internal consistency check failed (that is, you encountered a bug). Note that -1 is usually mapped to 255 by your operating system.
When PHost terminates because it received signal X, it exits with status -X. For example, the interrupt signal (Ctrl-C) has number 2 and causes PHost to exit with code -2 (mapped to 254 by the operating system).
When you are checking turn files (-c), a nonzero status means that something was wrong with the turn file.
Value | Meaning |
---|---|
1 | Turn file is missing |
2 | Turn file is stale |
4 | Turn file is truncated |
8 | Turn file is damaged (unknown command) |
16 | Turn file comes from wrong player |
32 | Turn file checksum is incorrect |
64 | Yellow alert |
128 | Red alert |
When you're checking several files at once (-c0), exit status is the bitwise OR of all matching values. For example, an exit code of 10 = 8+2 means that at least one turn was stale and one was damaged.