[RESOLVED] String Manipulation
VB Code:
If InStr(sockBuff, "PRIVMSG") <> 0 Then
Select Case True
Case InStr(sockBuff, "!roll") <> 0:
y = Split(Mid(sockBuff, InStr(sockBuff, " : !roll ")), " ")
sendToIRC (sockBuff)
' status(0) = DCCCHat
' sckDCC(sckDCC.UBound).Connect ircGetIP(y(UBound(y) - 1)), Replace(y(UBound(y)), "", "")
I commented out the the last two lines. I thought they were causing me an error, and I don't want DCC anyway. Where I have "!roll" entered, it used to say "DCC CHAT". It keeps getting an error at the following bit of code:
VB Code:
y = Split(Mid(sockBuff, InStr(sockBuff, " : !roll ")), " ")
I hit F2 and typed in SPLIT, but I'm afraid I am not able to figure out what all it's trying to do here. Can anyone explain it to me?
Also, how would I go about getting the first "CyberInfantry" only out of the following string:
:[email protected] PRIVMSG #shadowfall :!roll
Re: [RESOLVED] String Manipulation
CyberInfantry:
Quote:
if no numerical data is entered, it starts off at the beginning?
Yes, that is correct. It is an optional argument and if you leave it out it starts from the beginning of the string.