<div dir="ltr"><div class="gmail_default" style="font-size:large">Without SetLength(var,0) at the end I get Runtime Error 216 once, adding those - assuming FPC now required me to zero out those fields, I now get the error twice.</div><div class="gmail_default" style="font-size:large"><br></div><div class="gmail_default" style="font-size:large">Code:</div><div class="gmail_default" style="font-size:large">Program MakePrompts;<br><br>Type<br>   Language_File = Record<br>      Description:Array of Char; {null terminated string}<br>      Enabled:Boolean;<br>      SecurityLevel:Byte;        {zero to 255, 255 is reserved for SYSOP}<br>      Flags:Longint;             {32 Flags - A..Z,1..6}<br>      MenuPath:Array of Char;<br>      TextPath:Array of Char;<br>      QuestPath:Array of Char;<br>   End;<br><br>Var<br>   L:Language_File;<br><br>Procedure Make_Language_File(<br>   Description,MenuPath,TextPath,QuestPath:String;<br>   Enabled:Boolean;SecurityLevel:Byte;Flags:Longint);<br>Var<br>   FileSize:Longint;<br><br>Begin<br>   Writeln('Language_File empty size is ',SizeOf(L));<br>   FileSize:=0;<br>   Description:=Description+#0;<br>   Inc(FileSize,Length(Description));<br>   MenuPath:=MenuPath+#0;<br>   Inc(FileSize,Length(MenuPath));<br>   TextPath:=TextPath+#0;<br>   Inc(FileSize,Length(TextPath));<br>   QuestPath:=QuestPath+#0;<br>   Inc(FileSize,Length(QuestPath));<br>   SetLength(L.Description,Length(Description));<br>   SetLength(L.MenuPath,Length(MenuPath));<br>   SetLength(L.TextPath,Length(TextPath));<br>   SetLength(L.QuestPath,Length(QuestPath));<br>   Move(Description[1],L.Description,Length(Description));<br>   Move(MenuPath[1],L.MenuPath,Length(MenuPath));<br>   Move(TextPath[1],L.TextPath,Length(TextPath));<br>   Move(QuestPath[1],L.QuestPath,Length(QuestPath));<br>   L.Enabled:=Enabled;<br>   L.SecurityLevel:=SecurityLevel;<br>   L.Flags:=Flags;<br>   Inc(FileSize,6);<br>   Writeln('Language_File size is ',FileSize);<br>   SetLength(L.Description,0);<br>   SetLength(L.MenuPath,0);<br>   SetLength(L.TextPath,0);<br>   SetLength(L.QuestPath,0);<br>End;<br><br>Begin<br>   Make_Language_File('English (c) 2022 by Ozz Nixon','%ROOTPATH%\MENUS\','%ROOTPATH%\TXTFILES\','%ROOTPATH%\QUESTION\',True,0,0);<br>End.<br></div></div>