Struggling to update code to support MYSQL R40+
#4

Код:
public onloadSafes() {
	new iRows;
	cache_get_row_count(iRows);
	
	if(!iRows) return printf("[LoadSafes] Failed to load any Safes.");
	    
	for(new iRow; iRow < iRows; iRow++) {
		cache_get_value_name_int(iRow, "safeDBID", SafeData[iRow][g_iDBID]); 		
		cache_get_value_name_int(iRow, "safeType", SafeData[iRow][g_iType]); 
		cache_get_value_name_int(iRow, "safeTypeID",SafeData[iRow][g_iTypeID]); 
		cache_get_field_name_int(iRow, "safeVW", SafeData[iRow][g_iVW]); 
		cache_get_field_name_int(iRow, "safeInt", SafeData[iRow][g_iInt]); 
		cache_get_field_name_int(iRow, "safeModel", SafeData[iRow][g_iModelID]); 
		cache_get_field_name_float(iRow, "safePosX", SafeData[iRow][g_fPos][0]); 
		cache_get_field_name_float(iRow, "safePosY", SafeData[iRow][g_fPos][1]); 
		cache_get_field_name_float(iRow, "safePosZ", SafeData[iRow][g_fPos][2]); 
		cache_get_field_name_float(iRow, "safeRotX", SafeData[iRow][g_fPos][3]); 
		cache_get_field_name_float(iRow, "safeRotY", SafeData[iRow][g_fPos][4]); 
		cache_get_field_name_float(iRow, "safeRotZ", SafeData[iRow][g_fPos][5]);
		cache_get_field_name_int(iRow, "safeMoney", SafeData[iRow][g_iMoney]); 
		cache_get_field_name_int(iRow, "safePin", SafeData[iRow][g_iPin]);
		cache_get_field_name_int(iRow, "safeRobbed", SafeData[iRow][g_iRobbed]); 
		cache_get_field_name_int(iRow, "safeRobbedTime", SafeData[iRow][g_tRobbedTime]); 
		processSafe(iRow);
	}
	return printf("[MySQL] Loaded %i Safes from database.", iRows);
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)