Full Version : Latest SVN problems
xmlspawner >>Scripting Support >>Latest SVN problems
<< Prev | Next >>
Lord Hog Fred- 11-21-2006
Ok I've just decided to go over to suing the latest SVN version of RunUO.
However, when I start the server and to compile the scripts I am getting these errors:

CODE
cannot override inherited member 'Server.Items.BaseWeapon.OnHit(Server.Mobile, Server.Mobile)' because it is not marked virtual, abstract, or override cannot override inherited member 'Server.Mobiles.BaseCreature.GetControlChance(Server.Mobile)' because it is not marked virtual, abstract, or override

Whats have these methods been changed to in the latest version, and is there an alternative to use?
Thanks ,
EDIT: Ok I seem to have found the problem with this, for some reason the SVN altered the BaseWeapon OnHit method to:

CODE
public void OnHit

from:

CODE
public virtual void OnHit

And also altered the BaseCreature GetControlChance to:

CODE
public double GetControlChance

from:

CODE
public virtual double GetControlChance

I changed them back but will this cause any long term problems?
ArteGordon- 11-21-2006
what you want to do is to override this overload of OnHit instead.

CODE
public virtual void OnHit( Mobile attacker, Mobile defender, double damageBonus )

I believe they changed it because if you just override the OnHit that takes two args, there are places in the code where it calls the 3 arg version and so your 2-arg override would be ignored.
Same deal with GetControlChance. Override this one instead.

CODE
public virtual double GetControlChance( Mobile m, bool useBaseSkill )

Lord Hog Fred- 11-21-2006
Ah ok thanks
I'm having some new problems now though :S.
Perhaps this isn't the best place to ask but I'm getting problems with the new Arraylists, namely with Knives Chat and Housing. Don't suppose you know how to update these?
ArteGordon- 11-21-2006
I would have to see the exact errors. They probably result from older systems using ArrayLists instead of the explicitly typed lists that are used in the current SVN.
You would just have to change those ArrayList references to the appropriate List types.
Lord Hog Fred- 11-21-2006

QUOTE (ArteGordon @ November 21, 2006 03:42 pm)
I would have to see the exact errors. They probably result from older systems using ArrayLists instead of the explicitly typed lists that are used in the current SVN. You would just have to change those ArrayList references to the appropriate List types.

What are the different list types?
I've tried converting the arraylist in the chat system to List<int> but still doesn't work. I'm assuming it's and int it uses, if you've got the different types of lsit that can be used I should be able to work it out for myself .
ArteGordon- 11-21-2006
it would indicate the type required in the error message that you got when compiling.
Lord Hog Fred- 11-21-2006

QUOTE (ArteGordon @ November 21, 2006 04:02 pm)
it would indicate the type required in the error message that you got when compiling.

Ah, ok then it's slightly harder than I expceted then because I tried changing it to List<int> and I get errors saying it can't convert to string I try List<string> and it can't convert to int .
I'll get the eroors and post them here.
Lord Hog Fred- 11-21-2006
Ok these are the errors that I am getting:

CODE
+ Custom/Systems/Knives/Knives Chat 3.0 Beta 6/General/General.cs: CS1502: Line 139: The best overloaded method match for 'System.Collections.G eneric.List<Server.Item>.List(int)' has some invalid arguments CS1503: Line 139: Argument '1': cannot convert from 'System.Collections.Arra
yList' to 'int'
CS1502: Line 177: The best overloaded method match for 'System.Collections.G
eneric.List<Server.Item>.Add(Server.Item)' has some invalid arguments
CS1503: Line 177: Argument '1': cannot convert from 'string' to 'Server.Item
'
CS0029: Line 187: Cannot implicitly convert type 'System.Collections.ArrayLi
st' to 'System.Collections.Generic.List<Server.Item>'
CS1502: Line 219: The best overloaded method match for 'System.Collections.G
eneric.List<Server.Item>.List(int)' has some invalid arguments
CS1503: Line 219: Argument '1': cannot convert from 'System.Collections.Gene
ric.IEnumerable<Server.Gumps.Gump>' to 'int'
CS0117: Line 222: 'System.Collections.Generic.IEnumerable<Server.Gumps.Gump>
' does not contain a definition for 'Remove'
+ Custom/Systems/Knives/Town Houses v1.1/Misc/General.cs:
CS0029: Line 67: Cannot implicitly convert type 'System.Collections.Generic.
List<Server.Multis.BaseHouse>' to 'System.Collections.ArrayList'

Hope this can help get to the bottom of this.
ArteGordon- 11-21-2006
yeah, some of those are more than just type mismatch problems.
The line 67, and 187 errors are simple type fixes, but the others appear to be more involved.
In particular, the issues with gumps (line 219, and 222) probably reflects some of the changes in gump handling that were introduced in the SVN that will probably require rewriting the logic of that code.
The line 139 and 177 errors would require seeing what the actual code was.
(edit)
are these from the latest version? I believe he is up to beta 8 now and that version was released after many of the SVN changes that are giving you problems and so I would guess that they have been addressed.
Lord Hog Fred- 11-21-2006
Ok well as regards the errors here are the lines.
Chat:

CODE
Line 21: private static List<Item> s_Locals = new List<Item>(); Line 139: foreach (Message msg in new List<Item>(data.Messages)) Line 177: s_Locals.Add(text); Line 187: s_Locals = DefaultLocal.Load(); Line 219: foreach (Gump g in new List<Item>(m.NetState.Gumps))
Line 222: m.NetState.Gumps.Remove(g);

Town houses:

CODE
Line 67: ArrayList houses = BaseHouse.GetHouses( e.Mobile );

HellRazor- 11-25-2006
I'm having trouble compiling the latest SVN 108. This is my first time compiling RUO 2 so its possible its something in my setup.
Any ideas? I'm sure its something simple.

CODE
Error 1 The type or namespace name 'SetDirect' does not exist in the namespace 'Server.Properties' (are you missing an assembly reference?) J:\RunUO SVN Solution\RunUO SVN\Scripts\Gumps\Properties\SetListOptionGump.cs 171 33 Scripts Error 2 The type or namespace name 'GetCPA' does not exist in the namespace 'Server.Properties' (are you missing an assembly reference?) J:\RunUO SVN Solution\RunUO SVN\Scripts\Commands\Properties.cs 713 31 Scripts
Error 3 The type or namespace name 'SetDirect' does not exist in the namespace 'Server.Properties' (are you missing an assembly reference?) J:\RunUO SVN Solution\RunUO SVN\Scripts\Gumps\Properties\SetCustomEnumGump.cs 32 27 Scripts
Error 4 The type or namespace name 'SetDirect' does not exist in the namespace 'Server.Properties' (are you missing an assembly reference?) J:\RunUO SVN Solution\RunUO SVN\Scripts\Gumps\Properties\SetCustomEnumGump.cs 34 27 Scripts
Error 5 The type or namespace name 'SetValue' does not exist in the namespace 'Server.Properties' (are you missing an assembly reference?) J:\RunUO SVN Solution\RunUO SVN\Scripts\Gumps\AdminGump.cs 2599 19 Scripts

ArteGordon- 11-25-2006
are you using the latest SVN scripts as well as the server?
HellRazor- 11-25-2006

QUOTE (ArteGordon @ November 25, 2006 06:59 pm)
are you using the latest SVN scripts as well as the server?

Yes - but I think I found the problem.
I used some project files from RunUO.com for my setup. The project was including the script base in the project, so the compiler was trying to compile the scripts along with the core. Doh.
Thanks Arte!