TimeStamp on saved file.

R

Rizlad

Guest
So I was throwing some polish on my save menu/features and wanted it to put a date/time stamp into the save.sav file and was wondering how best to approach saving / loading of date_datetime_string information.
Any insight is much appreciated !
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
Save date_current_datetime as a number (with sufficient precision) and you will be able to load that back up and display via date_datetime_string later
 
R

Rizlad

Guest
Save date_current_datetime as a number (with sufficient precision) and you will be able to load that back up and display via date_datetime_string later
Could you please elaborate a bit on how to save with sufficient prec. because I do better seeing pseudo code and Ive found this answer but don't understand how to change precision point.
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
Could you please elaborate a bit on how to save with sufficient prec. because I do better seeing pseudo code and Ive found this answer but don't understand how to change precision point.
That depends entirely on what functions are using to save the file - if you are saving the number as a string, then string_format is your friend; if you are using buffer functions, buffer_f64 will offer sufficient precision, etc.
 
R

Rizlad

Guest
string_format is what I was looking into as I have been using strings thus far but was more curious what was the most efficient way
 
R

Rizlad

Guest
So got timestamp to function by separating day month year and time into sections and then adding up in a string to display with "/" between after. Not sure if was date_datetime_string or what that was messing about but by using Current_date functions seems to have fixed my issue.

Thank you for your help Yellow, I appreciate people like you helping me learn to become more than an artist!
 
Top