Thanks for the replies.
I tested... works fine. Are you running ScriptDotNet.DLL that i uploaded yesterday? If not, try it.
That exception happens in static classes ... need more information though.
Recommendations :
1. Wrap the line in a try/catch
2. Make sure you're running the program in the debugger (hit PLAY button) so you can see what's going on
try
{
Console.WriteLine("Hex value from ScriptDotNet: {0:X}", Stealth.Script_GetSelfID());
}
catch (TypeInitializationException ex)
{
Trace.WriteLine(ex.InnerException); // System.Diagnostics
throw;
}
I added in your try catch. When I debug through the program, the exception doesn't get thrown. When I try to run the executable from the command prompt, I get the following exception.
Unhandled Exception: System.TypeInitializationException: The type initializer for 'ScriptDotNet.Stealth' threw an exception. ---> System.TimeoutExcept
ion: The operation has timed out.
at System.IO.Pipes.NamedPipeClientStream.Connect(Int32 timeout)
at ScriptDotNet.Stealth..cctor()
--- End of inner exception stack trace ---
at ScriptDotNet.Stealth.Script_GetSelfID()
at csSteathScripts.Program.Main(String[] args) in c:\StealthUOClient\csSteathScripts\csSteathScripts\Program.cs:line 25
In order to not get the exception, I had to run the command prompt as Administrator.
I haven't figured why my Python version crashes...
Is there a way you could compile the ScriptDotNet.dll with .NET 4 instead of .NET 4.5 so that I can run it on my XP machine?