Mirage Source
Compile error help: - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: Compile error help: (/showthread.php?tid=1019)



Compile error help: - genusis - 15-06-2007

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)


Re: Compile error help: - William - 15-06-2007

I suggest you check how the Map rec is setup and such and learn how it works.


Re: Compile error help: - genusis - 15-06-2007

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.


Re: Compile error help: - genusis - 15-06-2007

These two problems are know fixed just the other ones which i don't have a clue about in the other post.

Thanks DAVE!