<div dir="ltr"><div class="gmail_default" style="font-size:large">Just incase someone needs to know: (public release, not a custom build).</div><div class="gmail_default" style="font-size:large">Free Pascal Compiler version 3.0.4 [2017/10/06] for i386<br>Copyright (c) 1993-2017 by Florian Klaempfl and others<br>C:\FPC\3.0.4\bin\i386-Win32\fpc.exe [options] <inputfile> [options]<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 6, 2022 at 6:50 PM Ozz Nixon <<a href="mailto:ozznixon@gmail.com">ozznixon@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><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>
</blockquote></div>