GalacticGlum Posted May 11, 2015 Author Share Posted May 11, 2015 I have noticed that my server.exe has been crashing lately I then found my error log with this message. Only this message!"The following error occured at 'GetClassName' in 'modDatabase'. Run-time error '9': Subscript out of range."Does anyone know the problem if you do please help! Link to comment Share on other sites More sharing options...
abhi2011 Posted May 12, 2015 Share Posted May 12, 2015 Run the Server from VB6\. This will help you fix the bug more easily. Link to comment Share on other sites More sharing options...
JeffSventora Posted May 12, 2015 Share Posted May 12, 2015 Sounds like you might be trying to read in more classes than there is available in your .ini Link to comment Share on other sites More sharing options...
GalacticGlum Posted May 12, 2015 Author Share Posted May 12, 2015 @[member="JSventoraGD"] This is my .ini file[INIT]MaxClasses=5[CLASS1]Name=WarriorMaleSprite=201FemaleSprite=202Strength=6Endurance=7Intelligence=6Agility=7Willpower=6[CLASS2]Name=MagicianMaleSprite=201FemaleSprite=202Strength=1Endurance=3Intelligence=10Agility=5Willpower=10StartSpellCount=1StartSpell1=1[CLASS3]Name=RogueMaleSprite=201FemaleSprite=202Strength=1Endurance=6Intelligence=6Agility=10Willpower=6[CLASS4]Name=ArcherMaleSprite=201FemaleSprite=202Strength=4Endurance=6Intelligence=6Agility=7Willpower=6[CLASS5]Name=CircuitMaleSprite=203FemaleSprite=203Strength=5Endurance=6Intelligence=4Agility=3Willpower=3 Link to comment Share on other sites More sharing options...
Golf Posted May 12, 2015 Share Posted May 12, 2015 Can you screen shot whole sub ? Link to comment Share on other sites More sharing options...
Golf Posted May 12, 2015 Share Posted May 12, 2015 Try this ```Function GetClassName(ByVal ClassNum As Long) As StringIf ClassNum < 1 Or ClassNum > Max_Classes ThenGetClassName = "CLASS"ElseGetClassName = Trim$(Class(ClassNum).Name)End IfEnd Function``` Link to comment Share on other sites More sharing options...
GalacticGlum Posted May 12, 2015 Author Share Posted May 12, 2015 @[member="Golf"] , @[member="JSventoraGD"] , @[member="Abhi"] , *UPDATE*I believe I have solved the issue but I could be wrong I will update this post if the error occurs again. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now