So I am making a Command in my Mod to give something to a player when they say something in chat, but it seems to not be working. Code: if (stats.msg.ToUpper() == "CU:GETSOME") { ItemStack[] ExchangeItems = { new ItemStack(411,999), new ItemStack(402,999) }; GameAPI.Game_Request(CmdId.Request_Player_ItemExchange, (ushort)CmdId.Request_Player_ItemExchange, new ItemExchangeInfo(stats.playerId, "Gimme Stuff", "Because I said so!", "Here Ya Go", ExchangeItems)); }
try this? I'm no programmer but this isn't showing any errors when i type it in to Visual Studio Code: ItemStack[] EchangeItems = new ItemStack[] { new ItemStack(411,999), new ItemStack(402,999), }
you have one too many commas, but this is pretty much the same as what i have, it was my stats.playerId that wasn't working properly, thanks for trying though =)