i'm trying to give the player an amount of item but for loop breaks the game so i need some workaround
handlers.GameMasterGift = function(args,Stack,ItemId){ var Itemidss = null; if (args.Stack == 1) { Itemidss = args.ItemId; } else { Itemidss = args.ItemId +" "; for (var i = 1; i < args.Stack; i++) { Itemidss = ","+ args.ItemId + " " ; } } var result = server.GrantItemsToUser({ // In your game, this should just be a constant CatalogVersion : "Items", PlayFabId : currentPlayerId, ItemIds : [ Itemidss ] }); } <br><br><br><br>this don't work ,but if the stack is 1 it works, if it's more then 1 it stops and erros are showen