Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Compile error help:
#1
well it said compile error: sub or function not defined.

Code:
Sub LoadElements()
Dim FileName As String
Dim i As Long
Dim f As Long

    Call CheckElement
    For i = 1 To MAX_ELEMENTS
        Call SetStatus("Loading elements... " & Int((i / MAX_ELEMENTS) * 100) & "%")
        FileName = App.Path & "\Elements\Element" & i & ".dat"
        f = FreeFile
        Open FileName For Binary As #f
        Get #f, , Element(i)
        Close #f
        DoEvents

    Next
End Sub

It highlighted this. Element(i)
Reply
#2
I suggest you check how the Map rec is setup and such and learn how it works.
Reply
#3
Thankx Fixed It know this is throwing an error:

Code:
Public Sub ElementEditorInit()
    frmElementEditor.txtName.Text = Trim(Element(EditorIndex - 1).Name)
    frmElementEditor.scrlStrong.Value = Element(EditorIndex - 1).Strong
    frmElementEditor.scrlWeak.Value = Element(EditorIndex - 1).Weak
    frmElementEditor.Show vbModal
End Sub

frmElementEditor.txtName.Text = Trim(Element(EditorIndex - 1).Name)

frmElementEditor.txtName.Text = thats what it says.
Reply
#4
These two problems are know fixed just the other ones which i don't have a clue about in the other post.

Thanks DAVE!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)