08-11-2006, 03:21 PM
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
That is the packet section of sendstats, now I'll show you somthing that won't work with that 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.
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
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