DoStatstringParse function

From StealthBot Wiki

Revision as of 21:15, 27 December 2009 by Ribose (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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



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.


'//     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


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.


  • sStatstring is the string value you would like parsed.

See also

Personal tools