VB Code:
If InStr(comFinder, "!roll") = 1 Then If Len(comFinder) = 7 Or 8 Then numFinder = InStr(comFinder, " ") 'Error here. fstNum = Right(comFinder, Len(comFinder) - numFinder) sendToIRC (sendMsgText & " PRIVMSG #shadowfall :" & charName & " rolled " & CStr(fstNum) & " dice: " & diceRoller(fstNum, 0)) ElseIf Len(comFinder) = 9 Or 10 Or 11 Then numFinder = InStr(comFinder, " ") numFinder2 = InStr(numFinder + 1, comFinder, " ") fstNum = Mid(comFinder, numFinder + 1, numFinder2 - 1) sndNum = Mid(comFinder, numFinder2 + 1, Len(comFinder) - (numFinder2 + 1)) sendToIRC (sendMsgText & " PRIVMSG #shadowfall :" & charName & " rolled " & CStr(fstNum) & " dice: " & diceRoller(fstNum, sndNum)) End If End If
If it is sent "!roll 3" or "!roll 12" it works perfectly.
If it is sent "!roll 3 2", "!roll 10 2", or "!roll 10 10" it fails. It catches on the marked line of code. It shouldn't even be touching that code at this point. It shouldn't be meeting the requirements and should therefore be skipping over that lil' section to the "ElseIf".
What's going on?
Thank you all in advance for your time.![]()




Reply With Quote