23-06-2008, 05:12 PM
ok so this is probably some of the crappiest code youve ever seen but im just using this to see if the packets are working at all and cuz im not sure how you use bitblt yet >_< but either way its not working so please tell me if you can see the problem. cuz right now whenever i click the inventory button the inventory opens then the entire thing crashes
client
called when ever i click the inventory button
Server
under handledata
Client
under handle data
and this isnt mirage, ive coded all of my code from scratch so some of the names prolly dont sound fimiliar, but they are all similar to the mirage ones.
also my game doesnt have characters you have one account and thats it just so that you dont get confused cuz it doesnt have .char
client
called when ever i click the inventory button
Code:
Sub SendGetInv()
Dim Packet As String
Packet = PH_Inv & SepChar
Call SendData(Packet)
End Sub
Server
under handledata
Code:
If Parse(0) = PH_Inv Then
Call SendInv(Index)
End If
Code:
Sub SendInv(ByVal Index As Integer)
Dim Packet As String
Dim List As String
Dim i As Integer
For i = 1 To MAX_INV
List = List & GetUserInvSlot(Index, i) & SepChar
Next i
Packet = PH_Inv & SepChar & List
Call SendDataTo(Index, Packet)
End Sub
Client
under handle data
Code:
If Parse(0) = PH_Inv Then
For i = 0 To MAX_INV
frmMain.picInv(i).Picture = LoadPicture(App.Path & "/GFX/" & Parse(i + 1) & ".bmp")
Next i
End If
and this isnt mirage, ive coded all of my code from scratch so some of the names prolly dont sound fimiliar, but they are all similar to the mirage ones.
also my game doesnt have characters you have one account and thats it just so that you dont get confused cuz it doesnt have .char