If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

puntenspeler1, puntenspeler2, puntenspeler3 and puntenspeler4 are variables, they contain a certain score. With this statement, I want to print the name(variables: speler1, speler2, etc.) into a <p>tag. The printing works fine but the statement doesn't choose the right one, it should be the one with the highest score, but most of the time it just picks player one..

i haven't reviewed your whole code to try to troubleshoot it, but i believe you could go a long way by utilizng the 'sort' function. take a look at this simple use of the sort function - it takes the input from 4 text fields, places them in an array, sorts them, and outputs the sorted array ( from highest to lowest) in the p tag below it.see example

Unfortunately, I still can't make it show the player(Or players) with the highest score.. It seems to me that it would take the same ifelse after this.. Or is there a simple way to show only the one on the left? I don't want to display any scores further..

i truly don't understand where you are getting the players, or their values(scores), from.

however, you can play with the follwing code ( based on your original question's conditions), and see that these statments will trace out correctly depending onthe variable values. change the values around to see