How to print custom data with key value pairs of certain items from the inventory using C# from server side? Can someone paste the code? Where can I get these codes?
How to print custom data with key value pairs of certain items from the inventory using C# from server side? Can someone paste the code? Where can I get these codes?
In ItemInstance, you can find that CustomData is a Dict<String, String>. So in C#, it will be a Dictionary. If you are not clear with the usage, please check the docs, especially the Examples section.
The Example shows how to print all data in a Dictionary like
// When you use foreach to enumerate dictionary elements, // the elements are retrieved as KeyValuePair objects. Console.WriteLine(); foreach( KeyValuePair<string, string> kvp in openWith ) { Console.WriteLine("Key = {0}, Value = {1}", kvp.Key, kvp.Value); }
So may I know what's your problem is? What's the code you are using? Please understand we can't not write all the code for you, if you have any problem, please share the detailed issue so that we can help you better.
2 People are following this question.