[notabug] GetAchievementTimestamp(number achievementId) returns wrong datatype
Hello everyone,
I noticed the function "GetAchievementTimestamp(number achievementId)" returns "wrong" values. For my understanding the function expects a number, the id of an achievement, and should return a unix timestamp of the completion date of the given achievement or 0 if it hasn't been completed. Calling the function for completed achievements however, the return value is a floating point number. I did some investigation with the number the function returned: In my example, the returned number was "7.8484867882774e-315". The 64 bits of that double are "0000000000000000000000000000000001011110101011110101111011110011". When you interpret these bits as an unsigned long you get the value "1588551411", which is the actual unix timestamp of completion of the achievement I fed into the function, May 4th 2020. Seems like the lua backend just interprets the memory as the wrong data type so the issue should be easily fixable trough some pointer-casting-magic :) Unfortunatly I am unable to tell if this is a recent bug or if it has been in the game for longer. I hope this is helpful for the devs :) |
That's not a bug and was actually discussed on gitter a few weeks ago.
To clarify, the documentation states that the return type is an id64 which only looks like a number, but is actually some ESO specific black magic to bring 64 bit integers to Lua: Code:
* GetAchievementTimestamp(*integer* _achievementId_) Code:
* Id64ToString(*id64* _id_) |
All times are GMT -6. The time now is 08:00 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI