Sealbreaker Posted August 22, 2010 Author Share Posted August 22, 2010 I get subscript out of range and can't figure out why… idk if it helps, but i'll post the client-sided packet-sending-code aswell...```Public Sub SendGravity(ByVal Index As Long) Dim Buffer As clsBuffer Set Buffer = New clsBuffer Buffer.WriteLong CGravity SendData Buffer.ToArray() Set Buffer = NothingEnd Sub```and the code in which i get the error (server-sided) (I get it at the first point where i use Index)```Sub HandleGravity(ByVal Index As Long) Dim n As Long Dim Buffer As clsBuffer Set Buffer = New clsBuffer If Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Type <> TILE_TYPE_PLATFORM Then Call SetPLayerY(index, GetPLayerY(index) + 1) SendPlayerXY (Index) End If Set Buffer = NothingEnd Sub```I don't get what's wrong and i hope you can help me.-seal Link to comment Share on other sites More sharing options...
Robin Posted August 23, 2010 Share Posted August 23, 2010 Which line errors? Link to comment Share on other sites More sharing options...
Sealbreaker Posted August 23, 2010 Author Share Posted August 23, 2010 first the if-check for the platform-tile, if i make that line a comment it's the player.y-setting, so basically everything with a check for Index in it…-seal Link to comment Share on other sites More sharing options...
Robin Posted August 23, 2010 Share Posted August 23, 2010 ```If Index = 0 then exit sub```Add that before the if statement. Link to comment Share on other sites More sharing options...
Sealbreaker Posted August 23, 2010 Author Share Posted August 23, 2010 first off: thanks for helpingdidn't help, it gives the same error… maybe i could send you my client&server-source and you could check it? It is really important for me to get this working-seal Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now