14-04-2007, 11:04 AM
Replace:
With:
That should fix it, although you should probably also try and find the line of code that causes it. Cause this will not report a error, but the line of code that calls it wont work.
Code:
Function GetPlayerInvItemNum(ByVal Index As Long, ByVal InvSlot As Long) As Long
GetPlayerInvItemNum = Player(Index).Inv(InvSlot).Num
End Function
Code:
Function GetPlayerInvItemNum(ByVal Index As Long, ByVal InvSlot As Long) As Long
If Index < 1 or Index > MAX_PLAYERS or InvSlot < 1 or InvSlot > MAX_INV Then Exit Function
GetPlayerInvItemNum = Player(Index).Inv(InvSlot).Num
End Function
That should fix it, although you should probably also try and find the line of code that causes it. Cause this will not report a error, but the line of code that calls it wont work.