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!

Help

Alright, I have it a shot at trying to combine the two scripts. I thought I had it completely down, but I still get 1 error. Here's the error and the script:

Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
- Error: Scripts\Custom\Jhelom Training\BaseJhelom.cs: CS1501: (line 155, colum
n 16) No overload for method 'BaseVendor' takes '6' arguments
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
 

Attachments

  • BaseJhelom.cs
    14.1 KB · Views: 3
I know I'm using BaseVendor. I want the mobile to be able to sell weapons, bandages etc. and I also have it to set to resurrect players when they die. The BaseHire stuff will probably work if I change the constructor to BaseCreature, but then all of my SB stuff will not work.
 

TMSTKSBK

Lord
Yepyep...so find the BaseVendor script and see what arguments it does take!

Boom! you're good to go/cooking with gas. (or charcoal, whichever you prefer...)

You don't have to do anything drastic here. Just change the number and possibly type of arguments you're passing to the basevendor script.
 

Phantom

Knight
WanderingRage said:
I know I'm using BaseVendor. I want the mobile to be able to sell weapons, bandages etc. and I also have it to set to resurrect players when they die. The BaseHire stuff will probably work if I change the constructor to BaseCreature, but then all of my SB stuff will not work.

Then create a constructor with 6 arguments

What you have now won't work.
 

TMSTKSBK

Lord
That would also do it. But if you're trying to be able to release this without modding any distro files, then you're gonna need to change the order/number of the variables being passed to the constructor that you have. Right now you need to change the number. You either have too few or too many.

Keep going! You're almost there!

That's another one of the things I don't exactly know how to do...

Process 1 - No Vendor change:
Open up your BaseVendor.cs and read the constructors. Find one suitable to your needs and copy its arguments into your call on line 155.

Process 2 - Vendor change:
Open up your BaseVendor.cs and create a new constructor that has the data types you are passing from 155 as arguments.
 
I tried replacing the line:

public BaseJhelom( AIType AI ): base( AI, FightMode.Agressor, 10, 1, 0.1, 4.0 )

With:

public BaseJhelom(): base( AIType.AI_Melee, FightMode.Agressor, 10, 1, 0.1, 4.0 )

And now I get this error:

Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
- Error: Scripts\Custom\Jhelom Training\BaseJhelom.cs: CS0111: (line 155, colum
n 16) Class 'Server.Mobiles.BaseJhelom' already defines a member called 'BaseJhe
lom' with the same parameter types
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.

I'm just really not at all sure what I need to do.
 

Phantom

Knight
You just need to remove:

public BaseJhelom( AIType AI ): base( AI, FightMode.Agressor, 10, 1, 0.1, 4.0 )
{
}

Makes no sense for you to have it...

This is also wrong:

public BaseJhelom() : base( null )

You need to look at what a normal Vendor constructor has, thats what you need to use instead of using

Code:
public BaseJhelom() : base( null )
 
Okay, I have it all fixed, except for the fact that when you hire them, you can't attack them. Can someone help with this please?
 

Phantom

Knight
WanderingRage said:
Okay, I have it all fixed, except for the fact that when you hire them, you can't attack them. Can someone help with this please?

Vendors by default are invulerable...
 
No, it's not that. I fixed that. You can attack them up until you hire them. Then it won't let you do any damage. And now, it seems like everytime someone kills a few of them, they get a client error and crash. PLEASE help :( :(
 
Top