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!

Question regarding converting "old style" menus to RunUO 2.5

gibreaper

Sorceror
Hello all,

I have recently undertook the summer project of standing up my own shard. I have got really far on my own and decided that I would like to use the old style menus rather than what is currently stock. I have made all of the modifications I think I need to except I have one problem. When I compile, I am getting about 200 of these errors (all dealing with skill menus)


Error 215 'Server.Menus.ItemLists.ItemListEntry' does not contain a definition for 'craftIndex' and no extension method 'craftIndex' accepting a first argument of type 'Server.Menus.ItemLists.ItemListEntry' could be found (are you missing a using directive or an assembly reference?)

Here is the specific line of code referenced above:

DefInscription.CraftSystem.CreateItem(m_Mobile, DefInscription.CraftSystem.CraftItems.GetAt((m_Entries[index].craftIndex) +48).ItemType, type, m_Tool, DefInscription.CraftSystem.CraftItems.GetAt((m_Entries[index].craftIndex) +48));


Here is what I have done so far. I went back and did [docgen on RunUO 2.2 and found where craftIndex is part Server.Menus.ItemLists.ItemListEntry - but when I look for it on RunUO 2.5, that does not exist in the same namespace and I guess that's why I am getting the errors because they can't find the same tag. It appears RunUO 2.5 does not have this or has moved it elsewhere. I cannot find any reference to it in the documentation, I wish they had a namespace search. I understand these types of changes are guarded like gold, so if you don't want to share publicly, please PM me. As you can see, I have done my homework and have a good idea what the problem is, I just need a gentle nudge if someone can help - thanks!!
 

Dian

Sorceror
You should maybe go back to your original files and see how the ItemsListEntry is coded, and then compare it to the newer version you have to see the change. If it is an ArrayList, then that would make sense as the way the Array list is written had changed at some point. You could post your file as well so we can see what your code looks like too, and may be able to see whats wrong.

But as far as guarding changes.. thats actually quite the opposite. Any and all changes are completely public and in the open.. nothing to hide around here anymore since the Core (source) files were released years ago.
 

pooka01

Sorceror
(are you missing a using directive or an assembly reference?)

That is what i think that might do something.
Do you have an "using blablop" missing at the top of your script?
tried using Server.Menus;?
 

gibreaper

Sorceror
You should maybe go back to your original files and see how the ItemsListEntry is coded, and then compare it to the newer version you have to see the change. If it is an ArrayList, then that would make sense as the way the Array list is written had changed at some point. You could post your file as well so we can see what your code looks like too, and may be able to see whats wrong.

But as far as guarding changes.. thats actually quite the opposite. Any and all changes are completely public and in the open.. nothing to hide around here anymore since the Core (source) files were released years ago.

What I am doing is trying to implement the older menus that come in the Origins source package (RunUO 2.2) into a RunUO 2.5 server. The ItemsListMenu that comes in the Origins code is posted below. As you can see, m_craftIndex is declared in the class. When I go into the /docs and look at namespaces, all 4 of those declarations are listed under Server.Menus.Itemlists and that's why it works in RunUO 2.2.

(RunUO 2.2 ItemsListMenu)

using System;
using Server.Network;

namespace Server.Menus.ItemLists
{

public class ItemListEntry

{

private string m_Name;
private int m_ItemID;
private int m_Hue;
private int m_craftIndex;


Below is ItemsListMenu from 2.5, and note that m_craftIndex is no longer declared, nor is it listed as an option to put there under /docs. I feel this is the reason none of the menus I copied over are working. I hope I have explained this all correctly.


(RunUO 2.5 ItemsListMenu)

using System;
using Server.Network;

namespace Server.Menus.ItemLists
{

public class ItemListEntry

{

private string m_Name;
private int m_ItemID;
private int m_Hue;
**private m_craftIndex is missing here in RunUO2.5**
 
Top