Quote:
Originally Posted by fysiks
That code is essentially the same as the first one you posted.
Where in my code do you see "g_szCfgs[g_iCounter]"? No where. You need to do exactly what I did with your array in place of g_szCfgs if you want to do it my way.
However, I'm starting to think you should stick with the method in post #5. It is correct and will work. If it doesn't work then [I already suggested reasons] and if those didn't solve the problem then you need to debug it. Print the values of g_iCounter after every line that uses g_iCounter.
|
I think I got the index out of bound fixed by using post #5 method.
But I'm still getting errors
L 03/20/2013 - 20

9:12: [AMXX] Run time error 5: memory access
L 03/20/2013 - 20

9:12: [AMXX] [0] server_query.inc::ServerResponseReadByte (line 230)
L 03/20/2013 - 20

9:12: [AMXX] [1] server_query.inc::ServerResponseParseInfo (line 119)
L 03/20/2013 - 20

9:12: [AMXX] [2] serversinfo.sma::cbInfo (line 48 )
For server_query.inc::ServerResponseParseInfo (line 119)
Code:
new iType;
new iTemp;
new current = 0;
current += ServerResponseReadByte(Response[current], iType);
For server_query.inc::ServerResponseReadByte (line 230)
Code:
stock ServerResponseReadByte(const Response[], &res)
{
res = Response[0] & 0xFF;
return 1;
}
And serversinfo.sma::cbInfo (line 48
Code:
ServerResponseParseInfo(Response, szName, 63, szMap, 63, szDirectory, 63, szDescription, 63, iPlayers, iMaxPlayers);