10.07.2012, 11:40
Hi all.
I have some teritories on my gangs, and when i load it, crashdetect print me this:
Line: 15475:
All mysql thread:
Any ideas?
I have some teritories on my gangs, and when i load it, crashdetect print me this:
Код:
[21:17:17] [debug] Run time error 4: "Array index out of bounds" [21:17:17] [debug] Accessing element at index 6 past array upper bound 5 [21:17:17] [debug] Backtrace: [21:17:17] [debug] #0 000c6f44 in public OnQueryFinish (query[]=@0x002433e8 "", resultid=37, extraid=-1, connectionHandle=1) at D:\RAS\RAS\Build 25\gamemodes\RAS.pwn:15475
Код:
mysql_get_field( "minx", terField ); Teritories[ X ][ minx ] = floatstr( terField );
Код:
case THREAD_LOAD_TERITORIES: { mysql_store_result( ); new terField[ 56 ], X ; while( mysql_retrieve_row( ) ) { mysql_get_field( "Key", terField ); X = strval( terField ); mysql_get_field( "minx", terField ); Teritories[ X ][ minx ] = floatstr( terField ); mysql_get_field( "miny", terField ); Teritories[ X ][ miny ] = floatstr( terField ); mysql_get_field( "maxx", terField ); Teritories[ X ][ maxx ] = floatstr( terField ); mysql_get_field( "maxy", terField ); Teritories[ X ][ maxy ] = floatstr( terField ); mysql_get_field( "owner", terField ); Teritories[ X ][ owner ] = strval( terField ); Teritories[ X ][ ID ] = GangZoneCreate( Teritories[ X ][ minx ], Teritories[ X ][ miny ], Teritories[ X ][ maxx ], Teritories[ X ][ maxy ] ); } printf( "%d Teritories Loaded.", mysql_num_rows( ) ); mysql_free_result( ); }