-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JP IFF files are not working - System.InvalidCastException #36
Comments
I'm pretty sure the IFF file model I built that's present in the library is for US data models only, so the error you are getting makes sense.
I could implement the other models as well, but that's too much work for me. As a fix you can implement your own struct type ex. (obviously does not work) public struct MyCaddie
{
public ushort Some { get; set; }
public ushort Custom { get; set; }
public ushort Values { get; set; }
}
IFFFile<MyCaddie> IFF = new IFFFile<MyCaddie>(File.Open("Caddie.iff", FileMode.Open)); I wrote the class in such a way that developers can supply their own models. You could take a look at how https://github.com/retreev/PangLib/blob/master/PangLib.IFF/Models/Data/Caddie.cs is composed and see if someone else documented how a JP caddie is made up, otherwise you could also use this as an exercise to figure it out yourself! |
Description: I am trying to load a Caddie.iff (from pangya_jp).
Problem: I get "System.InvalidCastException: 'The record length (248) mismatches the length of the passed structure (260)'"
Code snippet used:
Here the Caddie.iff file I am trying to load: Caddie.zip
The text was updated successfully, but these errors were encountered: