Delancis Posted January 17, 2013 Author Share Posted January 17, 2013 Hello, I need your help. I get an error:**run-time error '9':****Subscript out of range**I'm trying that new players registered, start with equipaments put.The change in server.vbp codes are:**In Private Type ClassRec**```Malequip(1 To Equipment.Equipment_Count - 1) As ByteFemalequip(1 To Equipment.Equipment_Count - 1) As Byte```**moddatabase in process LoadClasses**```' Malestarequip Class(i).Malequip(Equipment.Armor) = Val(GetVar(filename, "CLASS" & i, "MaleEquipArmor")) Class(i).Malequip(Equipment.Helmet) = Val(GetVar(filename, "CLASS" & i, "MaleEquipHelmet")) Class(i).Malequip(Equipment.Shield) = Val(GetVar(filename, "CLASS" & i, "MaleEquipShield")) Class(i).equip(Equipment.Weapon) = Val(GetVar(filename, "CLASS" & i, "MaleEquipWeapon"))' Femalestartequip Class(i).Femalequip(Equipment.Armor) = Val(GetVar(filename, "CLASS" & i, "FemaleEquipArmor")) Class(i).Femalequip(Equipment.Helmet) = Val(GetVar(filename, "CLASS" & i, "FemaleEquipHelmet")) Class(i).Femalequip(Equipment.Shield) = Val(GetVar(filename, "CLASS" & i, "FemaleEquipShield")) Class(i).Femalequip(Equipment.Weapon) = Val(GetVar(filename, "CLASS" & i, "FemaleEquipWeapon"))```**and process SaveClasses**```' Save Male equipment Call PutVar(filename, "CLASS" & i, "MaleEquipArmor", STR(Class(i).Malequip(Equipment.Armor))) Call PutVar(filename, "CLASS" & i, "MaleEquipHelmet", STR(Class(i).Malequip(Equipment.Helmet))) Call PutVar(filename, "CLASS" & i, "MaleEquipShield", STR(Class(i).Malequip(Equipment.Shield))) Call PutVar(filename, "CLASS" & i, "MaleEquipWeapon", STR(Class(i).Malequip(Equipment.Weapon)))' Save Female equipment Call PutVar(filename, "CLASS" & i, "FemaleEquipArmor", STR(Class(i).Femalequip(Equipment.Armor))) Call PutVar(filename, "CLASS" & i, "FemaleEquipHelmet", STR(Class(i).Femalequip(Equipment.Helmet))) Call PutVar(filename, "CLASS" & i, "FemaleEquipShield", STR(Class(i).Femalequip(Equipment.Shield))) Call PutVar(filename, "CLASS" & i, "FemaleEquipWeapon", STR(Class(i).Femalequip(Equipment.Weapon)))```**And finally in the process Addchar**```[size] ' set starter equipament For n = 1 To Equipment.Equipment_Count - 1 If Player(index).Sex = SEX_MALE Then Player(index).Equipment(n) = Class(ClassNum).Malequip(n) Else Player(index).Equipment(n) = Class(ClassNum).Femalequip(n) End If Next [/size][color]What is the error or missing?? I'm doing well? help please[/color]``` Link to comment Share on other sites More sharing options...
abhi2011 Posted January 18, 2013 Share Posted January 18, 2013 So where did it error? Try pressing the debug button while in the IDE and it will highlight the code thats is out of range. Paste that code here. Link to comment Share on other sites More sharing options...
DeathKnight Posted January 18, 2013 Share Posted January 18, 2013 Looking at the above, I would have to guess he gets it when he clicks the create character button.Did you make sure to add a malequip and femalequip into the text file for your current classes? Link to comment Share on other sites More sharing options...
Delancis Posted January 18, 2013 Author Share Posted January 18, 2013 Yes I added the Malequipe and Femalequip in the text, also debug the code. The error I get on the server when I try to Log In or register in the client Link to comment Share on other sites More sharing options...
abhi2011 Posted January 19, 2013 Share Posted January 19, 2013 Which line of code plz. Link to comment Share on other sites More sharing options...
Delancis Posted January 25, 2013 Author Share Posted January 25, 2013 The code, which I wrote up in the first post Link to comment Share on other sites More sharing options...
abhi2011 Posted January 25, 2013 Share Posted January 25, 2013 u said the code errored in login. paste the line here. Link to comment Share on other sites More sharing options...
Delancis Posted January 26, 2013 Author Share Posted January 26, 2013 ![](http://img855.imageshack.us/img855/8798/error9.png)I do not know exactly which line the error occurs, so I copied them in the first post the new codes to add the server. So help me to find where this error .. : ( 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