20.01.2016, 15:45
My guess is that you either go past the maximum size with the [i] thingie, or that it somehow doesn't like the -1, the value you give to serverid. Can you show how you create the friends array? That would give me a clearer picture of how the array is built.
A little confused because the log says
which leads me to believe that
is the thing that causes your issue, since I see no other '-1' there. But that would be rather odd.
Anyways; If you show how you create your Friends array, it would make it a lot easier to rule things out I guess The possibility might also be, that it is not in this function that you posted. The log also says 'OnAccountLoad ()', so you could also post that so we can check that out if we don't find anything in the Friends array and that function.
A little confused because the log says
Код:
[15:51:35] [debug] Accessing element at negative index -1
Код:
Friends[playerid][i][serverid] = -1; //<-- this value you set it to
Anyways; If you show how you create your Friends array, it would make it a lot easier to rule things out I guess The possibility might also be, that it is not in this function that you posted. The log also says 'OnAccountLoad ()', so you could also post that so we can check that out if we don't find anything in the Friends array and that function.