XCOM SHA Patcher for Executable (XSHAPE) v0.13b ERROR(5) USAGE: java -jar XSHAPE.jar -<verbose> <starting byte> More information: http://code.google.com/p/xshape
I know this error code can show up when the ".uncompressed_size" files haven't been removed. Are there other situations that could result in this error code?
Here's the source code up to error code 5...
if (args.length == 0) return 1;
if (!configFile.canRead()) return 2;
if (configFile.length() == 0) return 3;
scan = new Scanner(configFile);
while (scan.hasNextLine())
{
String line = scan.nextLine().trim();
if (line.isEmpty())
{
scan.close();
return 4;
}
if (!isCompressed(line)) ++count;
}
scan.close();
if (count == 0) return 5;
Now here's the isCompressed function:
final static String CFOLDER = "XComGame\\CookedPCConsole\\";
final static String COMPRESSED = ".uncompressed_size";
static boolean isCompressed(String s)
{
return new File(CFOLDER + s + COMPRESSED).exists();
}
Note: The !'s mean NOT
If I missed something, it's not on the if (!isCompressed(line)) ++count; line, since isCompressed(...) can only return true for one reason.
You have to look at that while loop and think of a reason it would exit before incrementing the local count variable, but also a reason that would not return exit codes 1 through 4.
I can't think of any reason other than the uncompressed.size files existing.
Basically, the line: while (scan.hasNextLine()) would have to return false for a reasons other than:
1) bad arguments sent to XSHAPE.jar
2) config file can't be read
3) config file is empty
4) config file contains lines of whitespace
The only thing that comes to mind is if you have a filename added to the config file (whatever.ext), and you have that same filename in your cooked folder with .uncompressed_size added on to it (whatever.ext.uncompressed_size).
Did you add any files to the config file?
Here's the full source code: http://code.google.c...unk/XShape.java
All sanity checks except for 16 are in: static int runSanityChecks(...)
Edited by Daemonjax, 02 November 2012 - 06:33 PM.



Sign In
Create Account

Back to top









