"Sputnik" help  
Sputnik Help
NbtListExRemoveTagAt(<nbtListEx>, <index>)

Description

Removes the NBT tag at the specified index from an NBT list.

Parameters

<nbtList> The NBT list from which to remove the NBT tag.
<index> The index of the NBT tag to be removed from the list.

Return Value

Success: Returns true if the NBT tag was successfully removed from the NBT list.
Failure: Returns false if the provided nbtList parameter is not a valid NBT list or if the index is out of range.

Remarks

The NbtListRemoveTagAt function allows you to remove the NBT tag at the specified index from an NBT list. It verifies that the nbtList parameter is a valid NBT list and the index is within the range of valid indices.

Related

Example

Example of usage:

my $nbt = NbtNew(@NbtListEx);
NbtListExAppendTag($nbt, Nbt("Hello"));
NbtListExAppendTag($nbt, Nbt("Cat"));
NbtListExAppendTag($nbt, Nbt("Dog"));
NbtListExInsertTag($nbt, Nbt("Kitten"), 0);
NbtListExInsertTag($nbt, Nbt("Dolphin"), 1);

NbtListExRemoveTagAt($nbt, 0);

say $nbt;

for (my $i = 0; $i < NbtListExTagCount($nbt); $i++)
    say "[$i] " . NbtListExGetAt($nbt, $i);

// PRINTS
// {NBTTag;ListEx:4 entries}
// [0] Dolphin
// [1] Hello
// [2] Cat
// [3] Dog

 


Contact
Cheryl (uberfox@hotmail.com)
Homepage
http://ubersoft.org