private void Form1_Load(object sender, EventArgs e)
{
try
{
Genie.Characters.Load("merlin", (object)"C:/Windows/msagent/chars/merlin.acs");
}
catch (COMException)
{
}
charater = Genie.Characters["merlin"];//此处报错:未处理的COMException The character ID is not valid.
Verify that ID has been defined and is spelled correctly.
if (charater != null)
{
charater.Show(null);
charater.LanguageID = 0x409;
}
}
------解决方案--------------------
没找到 merlin类型吧,看文件是否齐全
可把下面这条语句也放到try里面就不会报错了
try
{
Genie.Characters.Load("merlin", (object)"C:/Windows/msagent/chars/merlin.acs");
charater = Genie.Characters["merlin"];
}