I thought about this more, since I'm awake now, and, line numbers are (implicitly) shown, line 44 to 51. What do you want me to do, add the rest of the Main class, and number that?
Not sure where it did say the code started at line 44 initially but erm. Having every line numbered is the way to make it easier for people to help you. Screenshot would be fine imho.
packageRuntDeale.code;importjavax.imageio.ImageIO;importjava.awt.Dimension;importjavax.swing.JFrame;importjavax.swing.JPanel;importjava.awt.Graphics;importjava.lang.String;importjava.awt.Color;/**
* The game's main class.
*/finalclassMain{privatestaticfinalDimensionAPP_MINSIZE=newDimension(500,400);privatestaticfinalStringAPP_NAME="RuntDeale";privatestaticfinalfloatAPP_VER=0.01f;privatefinalEntityplayer=newEntity();privatefinalJFramewindow;privatefinalJPanelctx;privateMain(){window=newJFrame(APP_NAME);window.setResizable(true);window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);window.getContentPane().setBackground(Color.BLACK);window.setMinimumSize(APP_MINSIZE);window.setLayout(null);window.setVisible(true);ctx=newJPanel();}publicstaticvoidmain(String[]args){Mainprogram=newMain();try{program.run();}catch(Exceptionexc){program.setTitle("Exception: "+exc.getLocalizedMessage());}}/**
* Run the current program instance.
*/protectedvoidrun(){Graphicsg=ctx.getGraphics();while(true){try{g.drawImage(ImageIO.read(Backpack.getResource("resources/textures/characters/Chloe/front/walk_0.png")),(int)player.getX(),(int)player.getY(),null);}catch(Exceptionexc){}window.repaint();}}/**
* Set the title of program's window.
*/protectedvoidsetTitle(Strings){window.setTitle(s);}}
I thought about this more, since I'm awake now, and, line numbers are (implicitly) shown, line 44 to 51. What do you want me to do, add the rest of the
Main
class, and number that?Not sure where it did say the code started at line 44 initially but erm. Having every line numbered is the way to make it easier for people to help you. Screenshot would be fine imho.
Is this good? This is all of
Main.java
:Ha. Perhaps it is. I'll have a quick look tomorrow.
Do you not have teachers or colleagues to help with your stuff?
I don't have teachers, I'm 14, and don't have any classes pertaining.
Also, I live alone (excluding family), so I don't really have colleagues either.
So no, sadly.
If you feel like, drop by here: discord.gg/Y4MJgc244A
If you introduce yourself in general, it's mostly a tiny coder hideout I run.