Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
stupid inv
#1
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
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
Reply
#2
Crappest code I've ever seen.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#3
ya i think i know that already. do you have anything useful to say about it?
Reply
#4
NVM i fixed it. the name of the file it was trying to load was a integer so i just had to change it to a string. :oops:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)