Hello everyone, I want to fetch 2 player variables from all players that are currently online and then put them in a SendFrame126, i've tried the following code, but it crashes me. Can anyone help me with this?
And I also would like it that the highest scores come in first with the right usernames, but it really goes to far for me.
I've tried, but I can't do it.
I've started programming with Java just 3 days ago.
Thanks in advance,Code:public void scoreMenu() { clearQuestInterface(); int[] scores = new int[256]; String[] names = new String[256]; for(int i = 0; i < server.playerHandler.maxPlayers; i++) { if(server.playerHandler.players[i] != null) { scores[i] = server.playerHandler.players[i].playerScore; names[i] = server.playerHandler.players[i].playerName; if(i >= PlayerHandler.getPlayerCount()) { for(int a = 8720;a<8799;a++) { sendFrame126("",a); } for(int s = 0; s<PlayerHandler.getPlayerCount();s++) { sendFrame126(""+Integer.toString(scores[s]),8720+s); } for(int p = 0; p<PlayerHandler.getPlayerCount();p++){ sendFrame126(""+names[p],8760+p); } } } } sendQuestSomething(8713); showInterface(8714); flushOutStream(); }
DaMaGeX



Reply With Quote

