Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Weird xlint error with my linkedlist adding method
Index -> Programming, Java -> Java Help
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
gsquare567




PostPosted: Tue Dec 05, 2006 4:03 pm   Post subject: (No subject)

nope, didnt work. still says "Applet GalacticWar notinited". i dled the jdk 5 update 10...
Sponsor
Sponsor
Sponsor
sponsor
gsquare567




PostPosted: Wed Dec 06, 2006 7:16 pm   Post subject: (No subject)

BUMP...
and, added a lil info if it helps you solve this complex error Very Happy.

ok. i re-dled the whole jse and got update 10. heres the shiz lol:

HTML CODE

code:

<HTML>
<HEAD>
<TITLE>Galactic War - enhanced by Gsquare567</TITLE>
</HEAD>
<BODY>
<APPLET
        archive = "GalacticWar3.jar"
        code    = GalacticWar.class
        width   = "800"
        height  = "600"
        >
</APPLET>
</BODY>
</HTML>


FIRST LINES OF MAIN JAVA CODE

code:

public class GalacticWar extends Game

code:

abstract class Game extends Applet implements Runnable, KeyListener


MANIFEST FILE CODE
code:

Main-Class: GalacticWar



PS thanks a lot for helping me man. if you actually solve this problem... well... iunno i'll thank you. Confused
gsquare567




PostPosted: Thu Dec 07, 2006 8:06 pm   Post subject: (No subject)

whats with this wtd hasnt responded on the hour! is he sick or sumtin?
gsquare567




PostPosted: Sun Dec 10, 2006 2:32 pm   Post subject: (No subject)

anyone???
gsquare567




PostPosted: Wed Dec 13, 2006 9:57 pm   Post subject: (No subject)

ok, this is REALLY buggin me, so im just taking random guesses, hoping someone can help. so it says applet notinited, i thought, well maybe its the init method. well, here it is, i checked EVERYTHING i could, but there is something missing/incorrect. help! please!
code:
public void init()
        {
                backBuffer = new BufferedImage(screenWidth, screenHeight, BufferedImage.TYPE_INT_RGB);
                g2d = backBuffer.createGraphics();

                sprites = new LinkedList<AnimatedSprite>();

                addKeyListener(this);

                gameStartup();// implemented by subclass
        }

and here is the method implemented by the subclass.
code:
void gameStartup()
        {
                // load sounds and music
                music.load("music.midi");
                shoot.load("shoot.au");
                explosion.load("explode.au");

                // load the health/shield bars
                barFrame = new ImageEntity(this);
                barFrame.load("barframe.png");
                barImage[0] = new ImageEntity(this);
                barImage[0].load("bar_health.png");
                barImage[1] = new ImageEntity(this);
                barImage[1].load("bar_shield.png");

                // load powerups
                powerupShield = new ImageEntity(this);
                powerupShield.load("powerup_shield2.png");
                powerupHealth = new ImageEntity(this);
                powerupHealth.load("powerup_cola.png");
                powerup250 = new ImageEntity(this);
                powerup250.load("powerup_250.png");
                powerup500 = new ImageEntity(this);
                powerup500.load("powerup_500.png");
                powerup1000 = new ImageEntity(this);
                powerup1000.load("powerup_1000.png");
                powerupGun = new ImageEntity(this);
                powerupGun.load("powerup_gun.png");

                // load the background
                background = new ImageEntity(this);
                background.load("bluespace.png");

                // create the ship
                shipImage[0] = new ImageEntity(this);
                shipImage[0].load("spaceship.png");
                shipImage[1] = new ImageEntity(this);
                shipImage[1].load("ship_thrust.png");
                shipImage[2] = new ImageEntity(this);
                shipImage[2].load("ship_shield.png");

                AnimatedSprite ship = new AnimatedSprite(this, getGraphics());
                ship.setSpriteType(SPRITE_SHIP);
                ship.setImage(shipImage[0].getImage());
                ship.setFrameWidth(ship.getImageWidth());
                ship.setFrameHeight(ship.getImageHeight());
                ship.setPosition(new Point2D(SCREENWIDTH/2, SCREENWIDTH/2));
                ship.setAlive(true);
                ship.setState(STATE_EXPLODING);

                collisionTimer = System.currentTimeMillis();
                addToSprites(ship);

                // load the bullet
                bulletImage = new ImageEntity(this);
                bulletImage.load("plasmashot.png");

                // load the explosion
                explosions[0] = new ImageEntity(this);
                explosions[0].load("explosion.png");
                explosions[1] = new ImageEntity(this);
                explosions[1].load("explosion2.png");

                // load the asteroids
                for(int i = 0; i < 5; i++)
                {
                        bigAsteroids[i] = new ImageEntity(this);
                        bigAsteroids[i].load("asteroid" + (i+1) + ".png");
                }
                for(int i = 0; i < 2; i++)
                {
                        medAsteroids[i] = new ImageEntity(this);
                        medAsteroids[i].load("medium" + (i+1) + ".png");
                }
                for(int i = 0; i < 3; i++)
                {
                        smlAsteroids[i] = new ImageEntity(this);
                        smlAsteroids[i].load("small" + (i+1) + ".png");
                }
                for(int i = 0; i < 4; i++)
                {
                        tnyAsteroids[i] = new ImageEntity(this);
                        tnyAsteroids[i].load("tiny" + (i+1) + ".png");
                }

                // start in pause mode
                pauseGame();
        }


i checked that all files were written correctly, although i wasnt sure if a MIDI file's extension was mid or midi so i tried both, and neither worked, so i assume it doesnt matter. also, the au extension is for an AU file, and png is for PNG... so i know those are correct.
what could be the problem? just throw things PLEASE!
Neville




PostPosted: Wed Dec 13, 2006 11:40 pm   Post subject: (No subject)

I would start by debugging as much as you can. Do you use an IDE with built in debugging? This way you could step through and see where it is failing. If not, try writing an output file with little messages to see how far along your init() goes before it fails. That way you can narrow down the problem. It's most likely an exception being thrown somewhere.
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 2  [ 21 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: