I am trying to run this script but it gives me the following error and erdad not saying what happens ... please I need your help

Error:

Code:
Errors:
+ New Script/Items por Tiempo/Entrada VIP.cs:
    CS0111: Line 100: Type 'Server.Items.ballofvip' already defines a member cal
led 'ballofvip' 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.
 

Attachments

  • Entrada VIP.cs
    5.7 KB · Views: 4
Looks like you have 2 definitions of the same thing, a simple example (from MSDN).

Code:
// CS0111.cs
class A
{
   void Test() { }
   public static void Test(){}   // CS0111

   public static void Main() {}
}

you can see here, we have class A that defines a void Test (with no arguments) and a public static void Test (also with no arguments) This will result in the error you've reported.

in your case it's the constructor with the Serial argument, you have it defined twice.

Code:
public ballofvip( Serial serial ) : base( serial )
        {
        }

Remove one, keep the other one and you should be good to go.
 
The problem is that if you remove one of them I get the following error:

Code:
Errors:
+ New Script/Items por Tiempo/Entrada VIP.cs:
    CS0115: Line 8: 'Server.Items.ballofvip.InitMinHits': no suitable method fou
nd to override
    CS0115: Line 9: 'Server.Items.ballofvip.InitMaxHits': no suitable method fou
nd to override
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
 
The ball is based on the Item class. The item class has no virtual int for the following:

Code:
public override int InitMinHits{ get{ return 255; } }
public override int InitMaxHits{ get{ return 255; } }

When the code calls the above you get the error CS0115. It's the word override, it works with the virtual keywork in the base class. To fix the error you just need to remove the override keyword.

That said, The script is not actually using either the min or max that's shown here it was something for the base Item class but as the base Item class isn't using it either, I'd suggest commenting out those two lines and seeing what the effects are.
 
Will you edit it and give it to me because it gives me more mistakes, friend and apology



I want to clarify that this script is a ball that lasts 30 days and when the time is finished it is eliminated automatically
 
Talow basically told you what you have to do, you would just have to either remove these lines or add // infront of each line
 
If I delete those 2 lines I get the following error:

Code:
Errors:
+ New Script/Items por Tiempo/Entrada VIP.cs:
    CS0246: Line 25: The type or namespace name 'PlayerMobile' could not be foun
d (are you missing a using directive or an assembly reference?)
    CS0246: Line 25: The type or namespace name 'PlayerMobile' could not be foun
d (are you missing a using directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
 
is there that at the top of the script? (didnt check but I am sure that it is missing to 99.9% ;) )
Code:
using Server.Mobiles;
 
If I do that does not give error but when I enter the game to remove the item says that you can not build
[doublepost=1486835486][/doublepost]What I want is to merge these 2 script instead of an arc is the ball that there left the 2 script to see what I speak I hope
 

Attachments

  • Arco de vida 2 Hora.cs
    5.7 KB · Views: 1
  • ballofvip.cs
    1.3 KB · Views: 1
I am not sure what you mean, what should the ball do that it is not doing now?
and what do you mean when you say "I enter the game to remove the item says that you can not build"?
 
There pass 2 script one is the ballofvip ... when the user gives 2 click it transports it to a place ... the other script is an arc that is eliminated at 30 days ... what I want is that ballofvip Is eliminated at 30 days just like that bow.
 
I guess this will do just not sure about the message since I cant speak it. But I would suggest you looking over it and trying to understand it at least a litte :p will help you in the long run
 

Attachments

  • ballofvip.cs
    2.1 KB · Views: 3
I did test it on a local version, the timer runs. You can see the time in the props. It also deletes as you wanted after 30 days
 
if you want to add the time to the property that shows on a single click or in the context menu then you can add that too, you could take that from your bow script
 
Back