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

[VB6]Compiling error!


Golf
 Share

Recommended Posts

Fixed!

I  deleted one part of code and I dont know why but I fixed it by downloading original source copying whole sub and replacing it in my source.

```
Public Sub BltInventoryItem(ByVal x As Long, ByVal Y As Long)
Dim rec As RECT, rec_pos As RECT
Dim itemnum As Long, itempic As Long

' If debug mode, handle error then exit out
If Options.Debug = 1 Then On Error GoTo errorhandler

itemnum = GetPlayerInvItemNum(MyIndex, DragInvSlotNum)

If itemnum > 0 And itemnum <= MAX_ITEMS Then
itempic = Item(itemnum).Pic

If itempic = 0 Then Exit Sub

With rec
.top = 0
.Bottom = .top + PIC_Y
.Left = DDSD_Item(itempic).lWidth / 2
.Right = .Left + PIC_X
End With

With rec_pos
.top = 2
.Bottom = .top + PIC_Y
.Left = 2
.Right = .Left + PIC_X
End With

' Load item if not loaded, and reset timer
ItemTimer(itempic) = GetTickCount + SurfaceTimerMax

If DDS_Item(itempic) Is Nothing Then
Call InitDDSurf("Items\" & itempic, DDSD_Item(itempic), DDS_Item(itempic))
End If

Engine_BltToDC DDS_Item(itempic), rec, rec_pos, frmMain.picTempInv, False

With frmMain.picTempInv
.top = Y
.Left = x
.Visible = True
.ZOrder (0)
End With
End If

' Error handler
Exit Sub
errorhandler:
HandleError "BltInventoryItem", "modDirectDraw7", Err.Number, Err.Description, Err.Source, Err.HelpContext
Err.Clear
Exit Sub
End Sub

```
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...