function [chk,modes]=loadownerr(items,genfiles)

chk=0; chksize=0; chkclass=0;
if length(items)>13
    msgbox('You can load no more than 14 data files!','Error #035');
    chk=1;
else
    if isempty(items)
        msgbox('No data files uploaded!','Error #036');
        chk=1;
    else
        for i=1:length(genfiles)
            eval(['modes{i}=genfiles{i}.' items{i} ';']);
        end
        sizeschk=size(modes{1});
        for i=1:length(modes)
            sizes=size(modes{i});
            if ~isequal(sizes,sizeschk)
                chksize=chksize+1;
            end
            if (strcmp(class(modes{i}),'double') || strcmp(class(modes{i}),'single') || strcmp(class(modes{i}),'int8') || strcmp(class(modes{i}),'int16') || strcmp(class(modes{i}),'int32')...
                    || strcmp(class(modes{i}),'int64') || strcmp(class(modes{i}),'uint8') || strcmp(class(modes{i}),'uint16') || strcmp(class(modes{i}),'uint32') || strcmp(class(modes{i}),'uint64'))
                chkclass=0;
            else
                chkclass=chkclass+1;
            end
        end
        if chksize>0
            msgbox('Data sizes in loaded files must agree!','Error #037');
            chk=1;
        end
        if chkclass>0
            msgbox('Uploaded data must be of integer, single or double type!','Error #038');
            chk=1;
        end
    end
end
