Hi,
I'm using Slick2D to make a game and i get an error when i try to run it, but eclipse is saying there is nothing wrong with my code and i just can't fix it by myself.
Here is the code:
package game;
import org.newdawn.slick.*;
import org.newdawn.slick.state.*;
public class Game extends StateBasedGame{
public static final String frame_title = "Game";
public static final int menu = 0;
public static final int level_state = 1;
public static int height = 630;
public static int weight = 360;
public Game(String frame_title){
super(frame_title);
this.addState(new MenuState(menu));
this.addState(new LevelState(level_state));
}
public void initStatesList(GameContainer game_container) throws SlickException{
this.getState(menu);
this.getState(level_state);
this.enterState(menu);
}
public static void main(String[] args){
AppGameContainer frame;
try {
frame = new AppGameContainer(new Game(frame_title));// here is the problem i think
frame.setDisplayMode(height,weight,false);
frame.start();
}
catch(SlickException error){
error.printStackTrace();
}
}
}
And the error: