Difference between revisions of "User:Cogniac"
m |
m |
||
Line 19: | Line 19: | ||
try | try | ||
+ | <br /> | ||
{ | { | ||
: assembly = Assembly.LoadFrom("ShardScripts.dll"); | : assembly = Assembly.LoadFrom("ShardScripts.dll"); | ||
} | } | ||
+ | <br /> | ||
catch (Exception e) | catch (Exception e) | ||
<br /> | <br /> |
Revision as of 21:27, 24 December 2007
Template:Admins Shard: Atlantic
This part right here, Merl:
bool HaveCoreScriptsDll = true;//needed for project
- EnsureDirectory( "Scripts/" );
- EnsureDirectory( "Scripts/Output/" );
- if( m_AdditionalReferences.Count > 0 )
- {
- m_AdditionalReferences.Clear();
- }
- List<Assembly> assemblies = new List<Assembly>();
Assembly assembly = null;//needed for project
try
{
- assembly = Assembly.LoadFrom("ShardScripts.dll");
}
catch (Exception e)
{
- Console.WriteLine(String.Format("ShardScripts.DLL: {0}", e.Message));
- Console.WriteLine("Can't load script library, ShardScripts.DLL! Proceeding without it.");
- HaveCoreScriptsDll = false;
}
if (HaveCoreScriptsDll)
{
- if (!m_AdditionalReferences.Contains(assembly.Location))
- {
- m_AdditionalReferences.Add(assembly.Location);
- }
- assemblies.Add(assembly);
- Version CSversion = assembly.GetName().Version;
- Console.WriteLine("Using: [{0}] Version {1}.{2}.{3}.{4}", assembly.GetName().Name, CSversion.Major, CSversion.Minor, CSversion.Build, CSversion.Revision);
}