Jump to content
The simFlight Network Forums

Wrong Value with ipc.Read?

Recommended Posts

Hello Folks,

again i will ask for a little Help.

With those Lines of Code

 Monat, Tag = ipc.readStruct(0x0244, "2SB")
 Jahr = ipc.readSW(0x024A)
 Flugdatum = (string.format("%02d.%02d.%02d", Tag, Monat, Jahr))

Try to read out the Local Date Values. For Month and Year this works fine. But the Day doesn't fit the Day of the actual Date.

Tried some other ReadValues like "2UW", "2UB", "2SW". It leads all to the same Result. Month and Year are correct, Day is not.

I would be very glad, if someone could help. Thanks in Advance.



Link to comment
Share on other sites

Actually, just to correct Thomas (sorry, Thomas), 

Monat, Tag = ipc.readStruct(0x0244, "2SB")

should certainly get the Month in "Monat" and the day of the Month in "Tag", though of course "2UB" would be more appropriate than "2SB" since the month and day cannot be negative (not that it matters with this range of values).

So, what exactly are you getting for the day of the month? (Remember, this is the date in FS, which is often being set by the last flight you loaded -- it isn't necessarily your computer system date).

I'll check this here ...


Ah! it looks like it s getting the Day of the Week in 0245 instead of the day of the month. I'm just checking to see if it's a bug in FSUIPC or in FS ...



Link to comment
Share on other sites

Ooops! It's an outright error in a table in FSUIPC! It IS reading the day of the week, not month! It's been that way since those offset values were added, some 10 years ago! Seems like you are the first person to use that one, or at least the first to have bothered reporting it! So thanks!

Would you need an interim update, or just wait for the next release?



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.