Hey Guys, you can call me a noob, but i just don't get my code to function. It's a problem with some Libraries i think. I just want to implement a few Libraries like parts of Hump and LUBE. AnAL is working, but with LUBE and the other things, iget an error, i'll upload a zipped version of my project so that you can test the code. Please help me, this is my very first game and i want that my multiplayer works
P.S.: If you have any Ideas to make the code or the File management better, tell me, too, please
YGOFreak1997
Problem with Libraries
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- YGOFreak1997
- Party member
- Posts: 103
- Joined: Sun Jan 22, 2012 4:29 pm
- Location: Germany, Baden-Württemberg
- Contact:
Problem with Libraries
- Attachments
-
- TEST.rar
- Here is the "Project File"
- (28.09 KiB) Downloaded 269 times
Also look at my LÖVE-Tutorial-Youtube-Channel (German )
GitHub Repo: Click Me!
Website: No, Me!
IndieDB: Or Maybe Me?
ÖBEY!
GitHub Repo: Click Me!
Website: No, Me!
IndieDB: Or Maybe Me?
ÖBEY!
Re: Problem with Libraries
Please make a .love file for upload, you can find several guides on how to make them in this very forum.
Write the ö of Löve with Alt+numPad(148) or Alt+numPad(153)
- trubblegum
- Party member
- Posts: 192
- Joined: Wed Feb 22, 2012 10:40 pm
Re: Problem with Libraries
What he said, and read the docs that come with the lib.
According to LUBE's docs, it has dependencies.
According to LUBE's docs, it has dependencies.
- YGOFreak1997
- Party member
- Posts: 103
- Joined: Sun Jan 22, 2012 4:29 pm
- Location: Germany, Baden-Württemberg
- Contact:
Re: Problem with Libraries
Yeah, but seriously, I don't understand them
And by the way, what ist wrong with a .rar-File? Just change the extension in .love and it's fine!
And by the way, what ist wrong with a .rar-File? Just change the extension in .love and it's fine!
Also look at my LÖVE-Tutorial-Youtube-Channel (German )
GitHub Repo: Click Me!
Website: No, Me!
IndieDB: Or Maybe Me?
ÖBEY!
GitHub Repo: Click Me!
Website: No, Me!
IndieDB: Or Maybe Me?
ÖBEY!
- tentus
- Inner party member
- Posts: 1060
- Joined: Sun Oct 31, 2010 7:56 pm
- Location: Appalachia
- Contact:
Re: Problem with Libraries
False.YGOFreak1997 wrote:And by the way, what ist wrong with a .rar-File? Just change the extension in .love and it's fine!
Please check things before asserting them.
Kurosuke needs beta testers
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Problem with Libraries
Not everyone can open .rar-files.
For those who can't open it now, here's the proper .love: First of all, this:
should be:
This is very important. Otherwise, your game will not work.
Moving on, you write LUBE instead of lube, and you write lube.server and lube.client instead of lube.Server and lube.Client. You also need to write lube.Client.init. That's init, not Init.
At this point I stopped trying to fix your main.lua.
For those who can't open it now, here's the proper .love: First of all, this:
Code: Select all
hump.class = require ("Libraries/Class")
hump.vector= require ("Libraries/vector.lua")
hump.camera = require ("Libraries/Camera.lua")
local gwee = require ("Libraries/gwee.lua")
require ("Libraries/LUBE.lua")
require ("Libraries/slither.lua")
Code: Select all
hump = {}
hump.class = require ("Libraries.class")
hump.vector= require ("Libraries.vector")
hump.camera = require ("Libraries.camera")
local gwee = require ("Libraries.gwee")
require ("Libraries.LUBE")
require ("Libraries.slither")
Moving on, you write LUBE instead of lube, and you write lube.server and lube.client instead of lube.Server and lube.Client. You also need to write lube.Client.init. That's init, not Init.
At this point I stopped trying to fix your main.lua.
Help us help you: attach a .love.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Problem with Libraries
The problem is, btw, that you should really require slither before lube. That shouldn't matter though, because if you're using a new enough version of hump.class you already have a Class Commons-compatible class lib.
Furthermore, you don't call init, that's what the class lib does for you when you create it.
It is, however, ambitious of you to try to use the library if you can't understand what the reference manual is saying. I agree, it is not newbie-friendly, but then, it isn't intended that way, it is a reference manual, and just that. I suggest you look up a tutorial (perhaps one linked in the thread) to get a grasp of what you're supposed to be doing, and then use the reference manual for its intended use, reference.
But not. The error is that he shouldn't be instantiating lube.Client or lube.Server (regardless of their spelling), but rather one of the subclasses. (So lube.udpClient or lube.tcpClient and lube.udpServer and lube.udpClient.)Robin wrote: Moving on, you write LUBE instead of lube, and you write lube.server and lube.client instead of lube.Server and lube.Client. You also need to write lube.Client.init. That's init, not Init.
Furthermore, you don't call init, that's what the class lib does for you when you create it.
It is, however, ambitious of you to try to use the library if you can't understand what the reference manual is saying. I agree, it is not newbie-friendly, but then, it isn't intended that way, it is a reference manual, and just that. I suggest you look up a tutorial (perhaps one linked in the thread) to get a grasp of what you're supposed to be doing, and then use the reference manual for its intended use, reference.
- YGOFreak1997
- Party member
- Posts: 103
- Joined: Sun Jan 22, 2012 4:29 pm
- Location: Germany, Baden-Württemberg
- Contact:
Re: Problem with Libraries
Thank you very much
Yeah i know it's difficult for a newbie like me to understand things like LUBE, but I just want to make a little Multiplayer Tank-Game, and i thought, LUBE is the right thing for that project.
But i now have another Problem: I'll reupload the file so that you can test it again. I get an error in the LUBE-File...
Yeah i know it's difficult for a newbie like me to understand things like LUBE, but I just want to make a little Multiplayer Tank-Game, and i thought, LUBE is the right thing for that project.
Yeah, i just didn't understand what you meant with the "Common classes" implementation...It is, however, ambitious of you to try to use the library if you can't understand what the reference manual is saying. I agree, it is not newbie-friendly, but then, it isn't intended that way, it is a reference manual, and just that. I suggest you look up a tutorial (perhaps one linked in the thread) to get a grasp of what you're supposed to be doing, and then use the reference manual for its intended use, reference.
But i now have another Problem: I'll reupload the file so that you can test it again. I get an error in the LUBE-File...
- Attachments
-
- TEST.love
- The new version of my Testgame ^^
- (29.22 KiB) Downloaded 256 times
Also look at my LÖVE-Tutorial-Youtube-Channel (German )
GitHub Repo: Click Me!
Website: No, Me!
IndieDB: Or Maybe Me?
ÖBEY!
GitHub Repo: Click Me!
Website: No, Me!
IndieDB: Or Maybe Me?
ÖBEY!
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Problem with Libraries
This is an error you're likely to see a lot in your lua-life. If you see this, it means you called a function like this:
where it should've been:
(So a colon instead of a dot.)
Code: Select all
class.method(args)
Code: Select all
class:method(args)
- YGOFreak1997
- Party member
- Posts: 103
- Joined: Sun Jan 22, 2012 4:29 pm
- Location: Germany, Baden-Württemberg
- Contact:
Re: Problem with Libraries
Thank you
How you probably know by now, I am quite new to computer programming, but a class is kind of a program and a method is part of this "program" you can call within your code, right?
And if you say LUBE is too complicated for me, with what should I start instead? I just thought I set myself a goal which is not too difficult and I think i have found a good start...
How you probably know by now, I am quite new to computer programming, but a class is kind of a program and a method is part of this "program" you can call within your code, right?
And if you say LUBE is too complicated for me, with what should I start instead? I just thought I set myself a goal which is not too difficult and I think i have found a good start...
Also look at my LÖVE-Tutorial-Youtube-Channel (German )
GitHub Repo: Click Me!
Website: No, Me!
IndieDB: Or Maybe Me?
ÖBEY!
GitHub Repo: Click Me!
Website: No, Me!
IndieDB: Or Maybe Me?
ÖBEY!
Who is online
Users browsing this forum: Bing [Bot] and 10 guests