Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Old Bug
#1
Quote: ' Characters (we use 0 to prevent a crash that still needs to be figured out)
Char(0 To MAX_CHARS) As PlayerRec
Found in the account rec. I wonder if this is anything major.

Has anyone looked into this? Has anyone noticed it?
Reply
#2
Never seen it, but guess its worth checking out.
Reply
#3
I don't see why it needs to be changed.
Whats the diff starting from 0 as opposed to 1?
Arrays in languages outside of vb start at 0...its nothing crazy.
Reply
#4
It cant be that hard to find a fix.
Reply
#5
Misunderstood Wrote:I don't see why it needs to be changed.
Whats the diff starting from 0 as opposed to 1?
Arrays in languages outside of vb start at 0...its nothing crazy.

Good. Tongue
Just wanted confirmation that this is nothing serious.
Reply
#6
So, I checked it out. This was the problem when you changed it to 1:
Code:
Function GetPlayerMap(ByVal Index As Long) As Long
        GetPlayerMap = Player(Index).Char(Player(Index).CharNum).Map
End Function
supscript out of range 9

So it should work by changing that function to:
Code:
Function GetPlayerMap(ByVal Index As Long) As Long
    If Player(Index).CharNum > 0 And Player(Index).CharNum < MAX_CHARS + 1 Then
        GetPlayerMap = Player(Index).Char(Player(Index).CharNum).Map
    End If
End Function
Have not done much testing thought. Seems to work fine.
Reply
#7
You should have all your arrays start from 0. Gets you ready to move into the bigger languages Tongue
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


Forum Jump:


Users browsing this thread: 1 Guest(s)