Want to put an item into new characters pack

Blitzman

Citizen
I appologize, but I've searched and can't find any answers that work for me. I'm trying to add items from a script I found in the resources section to new characters pack, but I keep getting an error.

1619719639205.png

This is the section I am trying to add it to:

private static void AddBackpack(Mobile m)
{
Container pack = m.Backpack;
if (pack == null)
{
pack = new Backpack
{
Movable = false
};
m.AddItem(pack);
}
PackItem(new Gold(1000)); // Starting gold can be customized here
PackItem(goldbag());
PackItem(lootbag());
}

Any help is very much appreciated.

I realized that this is probably the wrong place to post this. I can't figure out how to delete it.
 
Last edited:

Lokai

Moderator
I moved this to Script Support.

I assume you created something called "goldbag" and something called "lootbag"?

If so, in those scripts, what is the namespace they are in?

In order for CharacterCreation.cs to see your scripts, they must either be in the same namespace, or CharacterCreation.cs must have a using directive at the top with the namespace name that those scripts are in.
 

Blitzman

Citizen
I moved this to Script Support.

I assume you created something called "goldbag" and something called "lootbag"?

If so, in those scripts, what is the namespace they are in?

In order for CharacterCreation.cs to see your scripts, they must either be in the same namespace, or CharacterCreation.cs must have a using directive at the top with the namespace name that those scripts are in.
Thank you so much! I'm sure that is the problem. I didn't put any using directives in. I'll have to try tomorrow. Getting to late for me tonight.
 

Blitzman

Citizen
I moved this to Script Support.

I assume you created something called "goldbag" and something called "lootbag"?

If so, in those scripts, what is the namespace they are in?

In order for CharacterCreation.cs to see your scripts, they must either be in the same namespace, or CharacterCreation.cs must have a using directive at the top with the namespace name that those scripts are in.
The using directive was the golden ticket! Thank you so much for your help!