Ok so I have tried various solutions to this problem and the ~10 underfull hbox warning have been reduced to 1. But this one's really sticky and I'm at my wit's end.
The warning is directed to the ending of the tabularx environment (not the table environment) and I highly suspect that it has something to do with the last column, especially the multicolumn I used to work around the math mode (that I created, called O) because I don't wan't the header to be in Math font. I also find it weird that not the entire space of that column is used. And also, the cmidrule-line that goes from column 2-5 didn't go all the way through like toprule and bottomrule so I had to shorten it negatively on the right side "cmidrule(lr{-13.5pt})...". I don't know what I did to cause this but I know that this was not always the case...
That's all the information I can give you, I hope there is a simple solution to this, I've been sitting at this for hours now :(((
EDIT: The warning specifies to the alignment, the full information is here: "Underfull \hbox (badness 10000) in alignment at lines 345--345" (this is the end of the tabularx environment)
Please don't kill me for my (probably) Spaghetti code, here is a shortened version of the table,:
%(these are all the packages I put in so far, don't know if it matters much)
\documentclass[paper=a4, titlepage, fontsize=14pt, DIV=calc, parskip=half]{scrartcl}
\usepackage[top=2.5cm, bottom=2.5cm, left=2.5cm, right=2.5cm]{geometry}
\usepackage[autostyle = true, german = quotes]{csquotes}
%\usepackage[ngerman]{babel}
\usepackage{polyglossia}
\setdefaultlanguage{german}
\setotherlanguages{english}
\usepackage{ulem}
\usepackage[x11names]{xcolor}
\usepackage{scrlayer-scrpage}
\usepackage{setspace}
\usepackage{booktabs}
\usepackage{array}
\usepackage{makecell}
\usepackage{tabularx}
\usepackage{tabulary} %tried to use this but tabularx is probably the better option for my use
\usepackage{ragged2e}
\usepackage{graphicx}
\usepackage{eso-pic}
\usepackage{hyperref}
\usepackage{url}
\usepackage{amsmath}\usepackage{amsfonts}\usepackage{amssymb}
%----------------------now to the table----------------------%
% math mode for the percentages
\newcolumntype{O}{>{$\displaystyle\hsize=0.8\hsize\RaggedRight}X<{$}}
\begingroup
\begin{table}[t]
\setlength{\tabcolsep}{5pt}
\renewcommand{\arraystretch}{1.5}
%just to make the horizontal lines touch the vertical one, irrelevant for this issue
\belowrulesep=0pt
\aboverulesep=0pt
\centering
\begin{tabularx}{\linewidth}{@{} >{\hsize=1.05\hsize\RaggedRight}X| >{\hsize=1.15\hsize\RaggedRight}X
>{\hsize=0.9\hsize\RaggedRight}X
>{\hsize=1.2\hsize\RaggedRight}X
O
@{}}
\toprule
Name &
Bedeutung &
Beispiel &
Entscheidungskriterium &
\multicolumn{1}{>{\hsize=0.8\hsize\RaggedRight}X}{Wahrscheinlichkeit} \\
\cmidrule(r{7.75pt}){1-1} \cmidrule(lr{-13.5pt}){2-5}
Höchste Karte & Keine der unteren Kombinationen & A♠ {\color{red}K♦} J♠ 7♣ 4♣ & Höhe der einzelnen Karten & 17,41 \% \\
Straight Flush & Straße in einer Farbe & 8♣ 9♣ 10♣ J♣ Q♣ & Höchste Karte & 0,028 \% \\
Royal Flush & Straße in einer Farbe mit Ass als höchste Karte & {\color{red}10♦ J♦ Q♦ K♦ A♦} & Split Pot & 0,003 \% \\ \bottomrule
\end{tabularx}
\end{table}
\endgroup
This is what it currently looks like. Don't worry about the contents, I cut most of it out in my code to make it easier to understand but for the image, I think it doesn't matter if the entire content is still there:
! LaTeX Error: Missing \begin{document}.
please post an example of the warning that you are asking about that does not generate errors