Hi all
I've added some code to the load game script, to take the first sixteen digits of the game description as a stored date and time:
var SlotDate;
var q = Game.GetSaveSlotDescription(SaveSlot);
var StringSplit = String(q);
var l = StringSplit.Length;
Game.Msg(StringSplit+" "+l);
if(l > 16)
{
SlotDate[i] = StringSplit.Substr(0, 16);
Game.Msg("i is:"+i+" SlotDate is:"+SlotDate[i]);
SlotButton.Text = StringSplit.Substr(16, l-16);
}
else
{
SlotButton.Text = Game.GetSaveSlotDescription(SaveSlot);
}
It seems that either the .Length or the String isn't working because although I know the game descriptions are over sixteen characters in length, the l>16 condition is not being met. I've tried to test it with a Game.Msg, but that never displays.
What am I doing wrong? Why is the length of the string not being returned and why do neither of the Game.Msg instructions display?
Thanks