14-09-2008, 08:33 PM
The first thing I see is you're not using the benefit of putting a sub in it's on module (HandleData). Every time the sub is called it creates all of these variables:
There really isn't a point to them not being static...so it would be good to just do:
Also any other subs / functions that get called a lot (like in a loop or whatever) should get static variables.
Code:
Dim Parse() As String
Dim Name As String
Dim Password As String
Dim Sex As Long
Dim Class As Long
Dim CharNum As Long
Dim Msg As String
Dim MsgTo As Long
Dim Dir As Long
Dim InvNum As Long
Dim Ammount As Long
Dim Damage As Long
Dim PointType As Long
Dim Movement As Long
Dim i As Long, n As Long, x As Long, y As Long, f As Long
Dim MapNum As Long
Dim s As String
Dim tMapStart As Long, tMapEnd As Long
Dim ShopNum As Long, ItemNum As Long
Dim DurNeeded As Long, GoldNeeded As Long
There really isn't a point to them not being static...so it would be good to just do:
Code:
Private Parse() As String
Private Name As String
Private Password As String
Private Sex As Long
Private Class As Long
Private CharNum As Long
Private Msg As String
Private MsgTo As Long
Private Dir As Long
Private InvNum As Long
Private Ammount As Long
Private Damage As Long
Private PointType As Long
Private Movement As Long
Private i As Long
Private n As Long
Private x As Long
Private y As Long
Private f As Long
Private MapNum As Long
Private s As String
Private tMapStart As Long
Private tMapEnd As Long
Private ShopNum As Long
Private ItemNum As Long
Private DurNeeded As Long
Private GoldNeeded As Long
Also any other subs / functions that get called a lot (like in a loop or whatever) should get static variables.