Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stop Non-numeric strings from crashing the server.
#1
Now I know this way may not be the most secure/effecient way to do this, but it will turn what would be a multiple hour project to be done in a matter of seconds. If you want to do it all manaully you can, but here is the quick easy way.

Open up a search box, go to modHandleData.

Search for CInt, replace all (in module) with CCInt

Search for CLng, replace all (in module) with CCLng

Search for CByte, replace all (in module) with CCByte

At the bottom add
[code]Private Function CCInt(ByRef s As String) As Integer
' Make sure there is a valid string
If LenB(s) = 0 Then Exit Function
' Check if it's a number
If Not s Like "*[!0-9]*" Then
' Check for overflows
If s >= -32768 Then
If s = -2147483468 Then
If s = 0 Then
If s
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)