2020-12-18, 11:26 AM
Good question.. Is there something else I can do to improve it?
Code:
function loadDealerShip( ) {
? ? new DS_Models = cache_num_rows( );
? ? if( DS_Models == 0 ) return print( "Loaded models: no rows detected" );
? ? for( new i, j = DS_Models; i != j; ) {
? ? ? ? cache_get_value_name_int( i, "ID", dsVariable[ i ][ dsID ] );
? ? ? ? cache_get_value_name_int( i, "Model", dsVariable[ i ][ dsModel ] );
? ? ? ? cache_get_value_name_int( i, "Stock", dsVariable[ i ][ dsStock ] );
? ? ? ? cache_get_value_name_int( i, "Speed", dsVariable[ i ][ dsSpeed ] );
? ? ? ? cache_get_value_name_int( i, "Price", dsVariable[ i ][ dsPrice ] );
? ? ? ? cache_get_value_name_int( i, "Type", dsVariable[ i ][ dsType ] );
? ? ? ? cache_get_value_name( i, "Car", dsVariable[ i ][ dsName ] );
? ? } printf( "Loaded models: %d", DS_Models );
return true; }