RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Where does the dll load the files from?

squishy

Wanderer
Where does the dll load the files from?

I already wrote this post whereelse where it didnt belong, so here i go again:

All basic methods im using result into the 'System.IO.DirectoryNotFoundException' , eg:
Gumps gumps = new Gumps(); or
Map.Felucca.GetImage
and so on

it doesnt seem to find the uo dir...

when i initialize Gumps, its directly followed by a 'System.TypeInitializationException': "The TypeInitializer for Ultima.Gumps caused an exception" as well

The Exceptions are caused while running those lines without any further *non-default* code

So where do i select the directory where to load the files from or what did i do wrong at all?
 

squishy

Wanderer
I can make a whole new Project, add the Ultima.dll as reference and use:

public class Gui : System.Windows.Forms.Form {
private static System.Windows.Forms.RichTextBox status;
private System.ComponentModel.Container components = null;

public Gui() {
Ultima.Gumps gumps = new Gumps();
PictureBox box = new PictureBox();
box.Image = Gumps.GetGump(0x1);
InitializeComponent();
}

Calling this ctor results into the mentioned errors: If i comment the first line (Gumps gumps = new Gumps();), the "box.Image = Gumps.GetGump(0x1);" thingy throws the DirectoryNotFoundException

and they also both throw a "System.TypeInitializationException" right after that.

someBitMap = Map.Felucca.GetImage; will only throw the first one

I would be happy if you at least could answer my question "Where does the Ultima.dll load the files from?" before you ask again what am i doing :p

I think that would basically help me... I hope, I can set it somewhere becaue if not, im obviously doomed
 

Arya

Wanderer
The SDK retrieves information about the UO folder from the registry, which is the only place where it can find it. My guess your registry information is not correct, or missing. You can check it out here:

HKEY_LOCAL_MACHINE\SOFTWARE\Origin Worlds Online

If you wish to specify a custom folder, or want to bypass your problem programmatically, use Ultima.Client.Directories.
 

Phantom

Knight
squishy

I want a class I can work with.

If you don't then I can't help me, this means you can't claim something doesn't work just because your to blind to allow me to help you :rolleyes:

Infact, tried of asking you are on your own :x
 

squishy

Wanderer
HKEY_LOCAL_MACHINE\SOFTWARE\Origin Worlds Online\Ultima Online\1.0

There it actually is it written down

The installation is AoS 2D and the directory settings are correct but it doenst find any Directory...
But the Client.Directory thing worked, thanks :)
 
Top