"Sputnik" help  
Sputnik Help
NbtStringToType(<string>)

Description

Converts the provided string representation of an NBT type to its corresponding NBT type integer value. The NbtStringToType function allows you to obtain the NBT type value based on its string representation.

Parameters

<string> The string representation of the NBT type to be converted.

Return Value

Success: Returns the NBT type integer value corresponding to the provided string representation.
Failure: Returns @NbtError if the provided string parameter does not correspond to a valid NBT type.

Remarks

The NbtStringToType function is used to convert a string representation of an NBT type to its corresponding NBT type integer value. This function can be helpful when working with NBT data that includes type information in string format.

Related

Example

Example of usage:

say @NbtDouble;
say NbtTypeToString(@NbtDouble);
say NbtStringToType("Double");

// PRINTS
// 9
// Double
// 9

 


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