> 全局变量初始化在任意使用到的脚本单元中执行都可以,在脚本的initialization和finalization中处理即可: ``` unit Q2; interface uses Classes, SysUtils; procedure Main(Npc: TNormNpc; Player: TPlayObject; Args: TArgs); var g_Names: TStrings; implementation procedure Main(Npc: TNormNpc; Player: TPlayObject; Args: TArgs); begin Player.Messagebox('hello!'); end; procedure InitNames; begin g_Names := TStringList.Create; g_Names.Add('xxxx'); end; procedure FinalNames; begin g_Names.Free; end; initialization InitNames; finalization FinalNames; end. ```