Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (603)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  [LibGdx] unknown error but it still works  (Read 697 times)
0 Members and 1 Guest are viewing this topic.
Offline alaslipknot
« Posted 2013-04-22 23:43:37 »

Hello everyone,
yesterday i stared to learn LibGdx, i set it up and read the Wiki and the examples and now am following one of the link on the LibGdx home page
and for some reason i don't know why this line of code is red-underline
1  
return new SplashScreen( this );

(it's in the first class of the blog )
i also tried to watch this video (i don't really like video tutorials)
and he did the same, and again it's red-underlined
the weird thing is when i run the "game", i get the same results just like in the tutorials

any help please ??

PS :
if anyone have a better starting tutorials,articles, or even videos then please post a link here
(my favorite Java Tutorials was the one from ZetCode , so you may have an idea of my favorite "type" )

thank you very much

"It's not at all important to get it right the first time. It's vitally important to get it right the last time."
Offline davedes
« Reply #1 - Posted 2013-04-23 00:02:29 »

If you are using Eclipse and your code has a red or yellow underline, you can hover your mouse over the line to see what the error is. Smiley

Lots of other tutorials mentioned here:
http://libgdx.badlogicgames.com/documentation.html

Offline alaslipknot
« Reply #2 - Posted 2013-04-23 00:18:14 »

oh  Cheesy
it said
Quote
The constructor SplashScreen(AngryMasons) is undefined

and when i click the "lamp" it said
Quote
No suggestions available

i don't know if am too sleepy now or it's a difficult error that i cannot understand  Tongue
help please  Roll Eyes ??

thank you

"It's not at all important to get it right the first time. It's vitally important to get it right the last time."
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Online HeroesGraveDev

JGO Kernel


Medals: 310
Projects: 11
Exp: 3 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #3 - Posted 2013-04-23 00:20:59 »

Quote
It would be nice to separate the code based on the screen. In order to achieve that in libgdx, we could modify our game's main class to extend com.badlogic.gdx.Game

                                                           

Offline alaslipknot
« Reply #4 - Posted 2013-04-23 00:33:11 »

yes i read that,
but i completely have no idea you know  Tongue

Ps :
did i rushed when i post this topic ? i just start libGdx yesterday, i think i should read more about it and just follow examples for now, and then i'll start to ask questions

Thanx for your help 

"It's not at all important to get it right the first time. It's vitally important to get it right the last time."
Offline Agro
« Reply #5 - Posted 2013-04-23 00:35:28 »

I had errors like that in eclipse, try just repasting the whole entire code. Eclipse has random errors like that xD

Offline davedes
« Reply #6 - Posted 2013-04-23 00:49:24 »

Probably because the type you are giving to your SplashScreen constructor ("AngryMasons") does not match the type expected, based on the constructor you defined in the SplashScreen class.

Offline wreed12345

JGO Knight


Medals: 25
Projects: 2
Exp: 2 years


http://linebylinecoding.blogspot.com/


« Reply #7 - Posted 2013-04-23 00:49:39 »

@Agro I hate when I get errors like that and it turns out eclipse was lying the whole time! Sometimes i get dissapointed when a copy and paste doesn't solve my problems:(

Online HeroesGraveDev

JGO Kernel


Medals: 310
Projects: 11
Exp: 3 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #8 - Posted 2013-04-23 00:53:55 »

If you made it extend Game then it should be fine.

Offline alaslipknot
« Reply #9 - Posted 2013-04-23 16:10:02 »

If you made it extend Game then it should be fine.

i copied the code, still red-underlined, but it works too
i dunno am not very focusing with LibGdx for now (need to complete the Java2D game that i started )   

thank you all

"It's not at all important to get it right the first time. It's vitally important to get it right the last time."
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (35 views)
2014-12-15 09:26:44

Mr.CodeIt (26 views)
2014-12-14 19:50:38

BurntPizza (60 views)
2014-12-09 22:41:13

BurntPizza (95 views)
2014-12-08 04:46:31

JscottyBieshaar (55 views)
2014-12-05 12:39:02

SHC (71 views)
2014-12-03 16:27:13

CopyableCougar4 (73 views)
2014-11-29 21:32:03

toopeicgaming1999 (133 views)
2014-11-26 15:22:04

toopeicgaming1999 (124 views)
2014-11-26 15:20:36

toopeicgaming1999 (34 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!