You need to add the Jar library.
Edit: Opening eclipse I figured I'd give you a more in-depth explanation.
Right Click on your Project > Properties > Java Build Path > Libraries > Add External Jars > *browse around and click the Jar to import it*
|
hey i did this http://www.rune-server.org/programmi...script-10.html
but im on eclipse and i get the import errors saying i need the package or something....
server.java
import org.runetoplist.VoteChecker;
public static VoteChecker voteChecker = new VoteChecker("url", "databse", "user", "pass"); <--- I did change them they are right in my files.
commands.java
import org.runetoplist.*;
VoteReward reward = Server.voteChecker.getReward(c.playerName.replaceAll(" ", "_"));
Everything that is red is the stuff that it says is wrong in eclipse. I get no errors in my compiler though.
What am i missing?
You need to add the Jar library.
Edit: Opening eclipse I figured I'd give you a more in-depth explanation.
Right Click on your Project > Properties > Java Build Path > Libraries > Add External Jars > *browse around and click the Jar to import it*
So how do i fix this?
nvm can someone just install this for me -_- i have it done on the website. just server part.
No its not cmd error it sends this message in game
[GTL Vote] A SQL error has occured
part of this commad
Code:if (playerCommand.equalsIgnoreCase("check") || playerCommand.equalsIgnoreCase("reward")) { try { VoteReward reward = Server.vote.hasVoted(c.playerName.replaceAll(" ", "_")); if(reward != null){ switch(reward.getReward()){ case 0: //rewards break; case 1: //etc default: c.sendMessage("Reward not found."); break; } c.sendMessage("Thank you for voting."); } else { c.sendMessage("You have no items waiting for you."); } } catch (Exception e){ c.sendMessage("[GTL Vote] A SQL error has occured."); } }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |