Poll: Is this useful?
You do not have permission to vote in this poll.
Yes very.
85.00%
17 85.00%
Ehh.
5.00%
1 5.00%
No
5.00%
1 5.00%
Why'd you bother posting this?
5.00%
1 5.00%
Total 20 vote(s) 100%
* You voted for this item. [Show Results]

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Live Stats+
#5
Post your "playerstats" packet that has the things from the tutorial and I'll see if I can help you.

But subscript out of range was something that I had a while back while trying to figure out the tut that was origanally posted here, when it said that to me it turned out that the way the data was sent server side from sub SendStats was not matching the way it was recieved client side... In short try making the parses look the same way they are in "playerStats" as they are in Sendstats.

here's an example
Code:
Packet = "PLAYERSTATS" & SEP_CHAR & GetPlayerSTR(Index) & SEP_CHAR & GetPlayerDEF(Index) & SEP_CHAR & GetPlayerSPEED(Index) & SEP_CHAR & GetPlayerMAGI(Index) & SEP_CHAR & GetPlayerLevel(Index) & SEP_CHAR & GetPlayerExp(Index) & SEP_CHAR & END_CHAR
That is the packet section of sendstats, now I'll show you somthing that won't work with that
Code:
If LCase(Parse(0)) = "playerstats" Then
        Call SetPlayerSTR(MyIndex, Val(Parse(6)))
        Call SetPlayerDEF(MyIndex, Val(Parse(5)))
        Call SetPlayerSPEED(MyIndex, Val(Parse(4)))
        Call SetPlayerMAGI(MyIndex, Val(Parse(3)))
        Call SetPlayerLevel(MyIndex, Val(Parse(2)))
        Call SetPlayerExp(MyIndex, Val(Parse(1)))

        frmMirage.lblSTR = GetPlayerSTR(MyIndex)
        frmMirage.lblDEF = GetPlayerDEF(MyIndex)
        frmMirage.lblSPEED = GetPlayerSPEED(MyIndex)
        frmMirage.lblMAGI = GetPlayerMAGI(MyIndex)
        frmMirage.lblLevel = GetPlayerLevel(MyIndex)
        frmMirage.lblExp = GetPlayerExp(MyIndex)
        frmMirage.lblBLOCK = Int(GetPlayerDEF(MyIndex) / 2) + Int(GetPlayerLevel(MyIndex) / 2)
        frmMirage.lblHIT = Int(GetPlayerSTR(MyIndex) / 2) + Int(GetPlayerLevel(MyIndex) / 2)
        frmMirage.lblNextLvl = (GetPlayerLevel(MyIndex) + 1)
        Exit Sub
Now if you look, the thing that is wrong is that the parsed items like str,def,speed,magi,level and exp are recieved diffrently then they are sent from the server side. So as long as they don't match the server side data you'll almost always get errors.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)