minipimp Posted August 3, 2012 Author Share Posted August 3, 2012 So when I create a spell, I am forced to pick a class for it to only work on.And It doesnt work.This is the sub, whats wrong? I want to beable to have a "None" option and then the other 4 classes.```Private Sub cmbClass_Click() ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler Spell(EditorIndex).ClassReq = cmbClass.ListIndex ' Error handler Exit Suberrorhandler: HandleError "cmbClass_Click", "frmEditor_Spell", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub``` Link to comment Share on other sites More sharing options...
minipimp Posted August 3, 2012 Author Share Posted August 3, 2012 Fixed my own problem…. All I had to do was add the "frm_editor_spells" before the .cmdclass```' build class combo frmEditor_Spell.cmbClass.Clear frmEditor_Spell.cmbClass.AddItem "None" For i = 1 To Max_Classes frmEditor_Spell.cmbClass.AddItem Trim$(Class(i).Name) Next If Spell(EditorIndex).ClassReq > -1 And Spell(EditorIndex).ClassReq <= Max_Classes Then frmEditor_Spell.cmbClass.ListIndex = Spell(EditorIndex).ClassReq End If``` Link to comment Share on other sites More sharing options...
Dawntide Posted August 3, 2012 Share Posted August 3, 2012 Okay, is it actually working ingame or are you just saying it is working because there is a "None" Option in the list now? Link to comment Share on other sites More sharing options...
minipimp Posted August 4, 2012 Author Share Posted August 4, 2012 I tested it, the class req actually works correctly selecting the class I picked. 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