Asylum317 0 #1 Posted December 14, 2014 A friend of mine sent me a source and when i got it, it had errors involving the commands, i can't figure it out and i asked him about it but he doesnt know where they came from either. i am stupid and suck at servers so i could really use the help. here is the error [url]http://prntscr.com/5glqe9[/url] and here is my commands if you need it [url]http://up.ht/13luF11[/url] Share this post Link to post Share on other sites
0 A Duck Tale 0 #2 Posted December 14, 2014 It's most likely caused by nesting issues (You either have too many or not enough of these: '}' ). you should check the method above the moderatorCommands() method to see if your nesting is done properly. It's likely that you just need to add another closing brace. Share this post Link to post Share on other sites
0 Asylum317 0 #3 Posted December 14, 2014 thanks for the reply, i have fixed some of the errors think now im stuck with this. [url]http://prntscr.com/5gm71l[/url] here is what that area of the code looks like for(int i = 0; i < Config.MAX_PLAYERS; i++) { if(PlayerHandler.players[i] != null) { if(PlayerHandler.players [i].playerName.equalsIgnoreCase(playerToTele)) { Client c2 = (Client)PlayerHandler.players[i]; c2.sendMessage("You have been teleported to " + c.playerName); c2.getPA().movePlayer(c.getX(), c.getY(), c.heightLevel); break; } } } } catch(Exception e) { c.sendMessage("Player Must Be Offline."); } } } public void administratorCommands(Client c, String playerCommand) { if (playerCommand.equalsIgnoreCase("bank")) { c.getPA().openUpBank(c.bankingTab); } if (playerCommand.startsWith("endeven")) { EventCheck.endEvent(); } if (playerCommand.startsWith("currentevent")) { String[] args = playerCommand.split(" ", 2); if (args[1] != null) EventCheck.currentEvent = Integer.parseInt(args [1]); } Share this post Link to post Share on other sites
0 A Duck Tale 0 #4 Posted December 14, 2014 (edited) Same deal again by the look of it. It thinks administratorCommands() is a part of your previous method, most likely due to improper nesting. Slightly off topic but the java file you posted above looks quite messy,(I'm assuming it was like this when you downloaded it). I would recommend reformatting it to look cleaner and cut down the amount of lines it takes up(not to mention get rid of all the duplicate commands :P). Edited December 14, 2014 by A Duck Tale Share this post Link to post Share on other sites
i am stupid and suck at servers so i could really use the help.
here is the error
[url]http://prntscr.com/5glqe9[/url]
and here is my commands if you need it
[url]http://up.ht/13luF11[/url]
Share this post
Link to post
Share on other sites