Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Spell Class Requirement


minipimp
 Share

Recommended Posts

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 Sub
errorhandler:
    HandleError "cmbClass_Click", "frmEditor_Spell", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub
```
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...