DoStatstringParse function

From StealthBot Wiki Backup
Jump to: navigation, search

The DoStatstringParse() Script Support Class function returns a UserStats object representing the provided statstring.

Development

This function was added by Stealth in version 2.7.

The "sClanTag" parameter was removed in 2.7.1 by Ribose, since it was not used.

Documentation

'// DOSTATSTRINGPARSE
'//     Parses a statstring given to you by GetInternalData (or elsewhere)
'//     Returns the parsed user-message string you see in join/leave messages
Public Function DoStatstringParse(ByVal sStatstring As String) As String
    'Dim sBuffer As String
    Dim UserStats As clsUserStats

    'Call ParseStatstring(sStatstring, sBuffer, sClanTag)

    ' ...
    Set UserStats = New clsUserStats

    ' ...
    UserStats.Statstring = sStatstring

    ' ...
    DoStatstringParse = UserStats.ToString

    ' ...
    Set UserStats = Nothing
End Function

Syntax

Pass a valid statstring to the function and use the returned UserStats object to get information about that string.

Set Stats = DoStatstringParse(OriginalStatstring)
Value = Stats.PropertyName

See the UserStats object article for examples and usage of the UserStats object.

Arguments

  • sStatstring is the string value you would like parsed.

See also