[EFF] DX8 Debug Help


I’m building off EFF (which I think is a build off of Eclipse Mega). I’ve already got extensive custom edits, so switching or restarting isn’t really in the bag. Yesterday I started getting an RTE9 in my modGraphics.

TEX_GUI is stored as DX8TextureRec, which includes Texture As Long. I’ve spent a couple hours poking around DX8 texture bugs on the net and am still at a loss. Anyone have any insights?

My sub Check_GUIs is working fine…

Public Sub CheckGUIs()

Dim I As Long

' If debug mode, handle error then exit out

If Options.Debug = 1 Then On Error GoTo ErrorHandler

I = 1

NumGUIs = 1

ReDim Tex_GUI(1)

While FileExist(GFX_PATH & "gui\" & I & GFX_EXT)

	 ReDim Preserve Tex_GUI(NumGUIs)

	 NumTextures = NumTextures + 1

	 ReDim Preserve gTexture(NumTextures)

	 Tex_GUI(NumGUIs).filepath = App.Path & GFX_PATH & "gui\" & I & GFX_EXT

	 Tex_GUI(NumGUIs).Texture = NumTextures

	 NumGUIs = NumGUIs + 1

	 I = I + 1


NumGUIs = NumGUIs - 1

' Error handler

Exit Sub


HandleError "CheckGUIs", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext


Exit Sub

End Sub

Still unsure why TEX_GUI isn’t storing data properly. This is where the RTE9 actually happens:

If you only have 3 textures, then it is trying to access data in the array that doesn’t exist.

Hi Tael, thanks for helping.

Is that in reference to a description and a photo that was in the original post that I just edited out? Turns out I was just being silly and checking the tex_gui(numguis) before it was dimmed. That was my bad, and turns out irrelevant to the error.

The Check_GUI code creates the textures, redimming them as it does the While FileExist. It’s set so that it will go just as far as the highest #.png in my GUI folder, which is right now 30.

I am losing it laughing at myself.

You know when you do something so impossibly stupid that you’d never notice? Instead of “18.png” I had “18 - copy.png”. It was so simple and so stupid that I overlooked it.

Tael, you led me to see the light. hahaha!

Log in to reply