It's the entire code of that specific weapon.
BTW what is a directive?
A directive can be a lot of things. I'll only explain the using directive, and only in the way you'll be using it, because directives are complicated and I don't want to confuse anyone.
Essentially the using directive allows you to use the types of a specific namespace without having to type that entire namespace. For instance, if you want to use the Vector3 type of the XNA Framework, you could type this:
Code:
namespace MyNamespace
{
class MyClass
{
static void Main()
{
Microsoft.Xna.Framework.Vector3 vector = new Microsoft.Xna.Framework.Vector3(5, 3, 1);
}
}
}
Code:
using Microsoft.Xna.Framework;
namespace MyNamespace
{
class MyClass
{
static void Main()
{
Vector3 vector = new Vector3(5, 3, 1);
}
}
}
You can easily solve this by adding using Terraria; to the top of your code (has to be before any other elements, or you'll get another error). In future, it's good practice to add these to the top of your code every time you make a new class.
Code:
// Thes first two are pretty much mandatory, unless you're making a static class for certain calculations.
using Terraria; // This is all the stuff Terraria uses.
using Terraria.ModLoader; // This is all the stuff tModLoader uses.
using Terraria.ID; // This one you need if you want to use the IDs from items or NPCs, not always necessary.
using Microsoft.Xna.Framework; // This one you almost always need for AIs, because it contains the Vector3 type, but isn't necessary for simple things like items.
using System; // I personally like this one, mainly for the Math class, but if you don't know what it does, there's little point in using it.