Dio skripte:
debug
[19:15:44] Run time error 4: "Array index out of bounds"
[19:15:44] Attempted to read/write array element at index 65535 in array of size 2000
[19:15:44] AMX backtrace:
[19:15:44] #0 00456dc0 in public m_CreateVehicle (modelid=1, Float:x=1.00000, Float:y=1.00000, Float:z=2.00000, Float:angle=1.00000, color1=1, color2=1, respawn_delay=300000) at C:\Users\Muma\Desktop\Imperium Gaming v1.0\gamemodes\IG.pwn:6076
[19:15:44] #1 005c6b18 in public OnVehiclesLoad (playerid=1001, targetid=1001, moneyauc=0) at C:\Users\Muma\Desktop\Imperium Gaming v1.0\gamemodes\IG.pwn:25254
mysql_format( _dbConnector, qa, sizeof( qa ), "SELECT * FROM `vehicles` WHERE `v_usage` != '1' ORDER BY veh_id ASC" );
mysql_pquery( _dbConnector, qa, "OnVehiclesLoad", "iii", 1001, 1001, 0 );
vehicleid = m_CreateVehicle.... tu baca debug tj linija 25254
FUNCTION: OnVehiclesLoad( playerid, targetid, moneyauc )
{
new rows, vehicleid;
cache_get_row_count(rows);
if( rows )
{
for( new i = 0; i < rows; i ++ )
{
vehicleid = m_CreateVehicle( cache_get_value_name_int( i, "v_model", VehicleInfo[ i ][ vModel ] ),
cache_get_value_name_float( i, "v_pos_x", VehicleInfo[ i ][ vLokacijaX ] ),
cache_get_value_name_float( i, "v_pos_y", VehicleInfo[ i ][ vLokacijaY ] ),
cache_get_value_name_float( i, "v_pos_z", VehicleInfo[ i ][ vLokacijaZ ] )+1.0,
cache_get_value_name_float( i, "v_pos_a", VehicleInfo[ i ][ vLokacijaA ] ),
cache_get_value_name_int( i, "v_color_1", VehicleInfo[ i ][ vColor1 ] ),
cache_get_value_name_int( i, "v_color_2", VehicleInfo[ i ][ vColor2 ] ), 300000 );
etc... pišite ako trebate cijeli callback
callback
FUNCTION: m_CreateVehicle( modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay )
{
if( ServerInfo[ BrojKreiranihVozila ] <= MaxBrojKreiranih )
{
ServerInfo[ BrojKreiranihVozila ]++;
new idKreiranog;
if( color1 < 0 || color2 < 0 )
{
color1 = random(127);
color2 = random(127);
}
if( modelid == 538 ) { idKreiranog = AddStaticVehicleEx( modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay ); }
else { idKreiranog = CreateVehicle( modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay ); }
new colorStr ;
format(colorStr, sizeof(colorStr), "%d-%d", color1, color2);
setproperty(_, "", PROPERTY_OFFSET(idKreiranog), colorStr);
RealVehiclePositions[ idKreiranog ][ 0 ] = x; //////////OVO JE LINIJA 6076
RealVehiclePositions[ idKreiranog ][ 1 ] = y;
RealVehiclePositions[ idKreiranog ][ 2 ] = z;
BusyVehicle[ idKreiranog ] = -1;
garbagemanVehicles[ idKreiranog ][ gPlayerID ] = -1;
return idKreiranog;
}
else return -1;
}
Neke slike/video za lakse dobivanje pomoci(neobavezno): //


