The error is saying that there is no tab at the index you are accessing. The reason you are getting these errors is because GDScript (and most programming languages) count starting at 0, instead of 1. Just subtract one from each of the lines that read set_tab_title(number, "Warrior").
For example, in line 7, just change it to the following: set_tab_title(0, "Warrior")