HelpFabiano Source /give error

Posts 1–7 of 7 · Page 1 of 1
Fabiano Source /give error
As soon as I opened the server for the first time I wasn't able to do /give it always says unknown type can someone give me the correct /give code for fabiano thanks
Here is what I came up with. Should work and if it doesn't just reply back on what it does.

internal class GiveCommand : Command
{
public GiveCommand()
: base("give", 1)
{
}

protected override bool Process(Player player, RealmTime time, string[] args)
{
if (args.Length == 0)
{
player.SendHelp("Usage: /give <Itemname>");
return false;
}
string name = string.Join(" ", args.ToArray()).Trim();
ushort objType;
//creates a new case insensitive dictionary based on the XmlDatas
Dictionary<string, ushort> icdatas = new Dictionary<string, ushort>(player.Manager.GameData.IdToObjectType,
StringComparer.OrdinalIgnoreCase);
if (!icdatas.TryGetValue(name, out objType))
{
player.SendError("Unknown type!");
return false;
}
if (!player.Manager.GameData.Items[objType].Secret || player.Client.Account.Rank >= 4)
{
for (int i = 0; i < player.Inventory.Length; i++)
if (player.Inventory[i] == null)
{
player.Inventory[i] = player.Manager.GameData.Items[objType];
player.UpdateCount++;
player.SaveToCharacter();
player.SendInfo("Success!");
break;
}
}
else
{
player.SendError("Item cannot be given!");
return false;
}
return true;
}
}
I used visual studio 15 to rebuild the solution with the code you gave me and got no errors which is good.
but for some reason it always says unknown type when I try to type the command anywhere standing with my character in the server.
do you have Skype I can send you a picture of it.
Like when I do /give it says 'Unknown Type' where in the area I typed /give, the unknown type appears with red font.
Im rank 3 on Heidisql with my account and I have XAMPP and everything properly download.
im sure im not the only one with this issue because the server came default with this message.
Its probably something super simple but I don't know what the issue is and a lot of people dont know what the issue is that's why I need help thanks .
/give Energy Staff ????
Quote Originally Posted by Fightera100 View Post
/give Energy Staff ????
wtf is ur fucking picture kappa


and also it might be /gimme in fabiano idk
Quote Originally Posted by NotKierze View Post
wtf is ur fucking picture kappa


and also it might be /gimme in fabiano idk
Nah its /give ^^
Quote Originally Posted by NotKierze View Post
wtf is ur fucking picture kappa


and also it might be /gimme in fabiano idk
Redownload the source from Fabians github. If you have just downloaded this source its not the source that has a error. Make sure you write the item name 100% correct.
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us