Hi guys,
I'm very new to LOVE2d and I am attempting to work through a book titled "LOVE for Lua Game Programming" by Darmie Akinlaja. It is available as a free e-book download if anyone would like to assist me. I am currently stuck on page 40 adding a level from Tiled to be used in my game via Advanced Tiled Loader. I have made sure that every line of code is the exact same as the book, but when I attempt to run the program I receive the error "Advanced-Tiled-Loader-master/TileLayer.lua:163:bad argument #1 to 'add' (number expected, got userdata)."
I looked in TileLayer.lua and I'm not sure if I need to mess with THAT or something else in my code (main.lua). I thought it much more likely that I would need to fix something in my code, even though it says the error is in that file - not sure I should need to edit that. I will include my .love file so that you can look at it. Anyone have any idea why it's acting up?
Thanks in advance!
[SOLVED] Bad Argument #1 to 'add' Using Tiled Map Editor
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
[SOLVED] Bad Argument #1 to 'add' Using Tiled Map Editor
- Attachments
-
- MapTest.love
- (65.66 KiB) Downloaded 230 times
Last edited by Trinica on Fri Feb 20, 2015 3:41 pm, edited 1 time in total.
Re: Bad Argument #1 to 'add' Using Tiled Map Editor
At what point do you get the error? The love file you attached seems to run fine for me - displays a yellow background with some floating platforms.
Re: Bad Argument #1 to 'add' Using Tiled Map Editor
Really?? It happens almost instantly for me. I see a black screen for a moment, then it displays the error. I have yet to see the map. =/
Re: Bad Argument #1 to 'add' Using Tiled Map Editor
Maybe you are using a different version of löve?Trinica wrote:Really?? It happens almost instantly for me. I see a black screen for a moment, then it displays the error. I have yet to see the map. =/
Re: Bad Argument #1 to 'add' Using Tiled Map Editor
That is very probable. I just checked my version of löve and I am evidently running 0.8.0. I was under the impression that I was running the latest version, but that apparently is not the case. I don't really understand how I'm running that version, I have the official repository added and I've updated it just now, but I'm still on 0.8.0. The .deb release on the front page will not work for me either, it just presents me with an error. Fun stuff.S0lll0s wrote:Maybe you are using a different version of löve?Trinica wrote:Really?? It happens almost instantly for me. I see a black screen for a moment, then it displays the error. I have yet to see the map. =/
EDIT: It appears as if my distribution is broken as of last night. I cannot update any packages or repositories and my package manager gives me an error for everything I try to do. I will return once I have sorted that out. I love Linux to death, but instances like this remind me why no distribution is ready for prime time/massive distribution. =[
Last edited by Trinica on Sat Feb 14, 2015 2:12 pm, edited 1 time in total.
Re: Bad Argument #1 to 'add' Using Tiled Map Editor
Well whats the error? if you are on debian there wont be a recent version in the repos 99% of the time (because debian isn't rolling-releasing and takes ages to integrate updates). Your options are fixing the dependencies or fixing the dependencies and compiling from sourceTrinica wrote:That is very probable. I just checked my version of löve and I am evidently running 0.8.0. I was under the impression that I was running the latest version, but that apparently is not the case. I don't really understand how I'm running that version, I have the official repository added and I've updated it just now, but I'm still on 0.8.0. The .deb release on the front page will not work for me either, it just presents me with an error. Fun stuff.S0lll0s wrote:Maybe you are using a different version of löve?Trinica wrote:Really?? It happens almost instantly for me. I see a black screen for a moment, then it displays the error. I have yet to see the map. =/
You will probably find more dependencies that aren't in the repos (SDL2), so you will have to compile some of them. It should be pretty doable though; a friend of mine did it with next-to-no linux knowledge.
Re: Bad Argument #1 to 'add' Using Tiled Map Editor
Software index is brokenS0lll0s wrote: Well whats the error? if you are on debian there wont be a recent version in the repos 99% of the time (because debian isn't rolling-releasing and takes ages to integrate updates). Your options are fixing the dependencies or fixing the dependencies and compiling from source
You will probably find more dependencies that aren't in the repos (SDL2), so you will have to compile some of them. It should be pretty doable though; a friend of mine did it with next-to-no linux knowledge.
This is a major failure of your software management system. Please check for broken packages with synaptic, check the file permissions and correctness of the file '/etc/apt/sources.list' and reload the software information with: 'sudo apt-get update' and 'sudo apt-get install -f'.
Huzzahhhh. I'm not even sure how to check for dependencies if it won't open a .deb file at all.
Re: Bad Argument #1 to 'add' Using Tiled Map Editor
Wow, you somehow bricked your apt... Post sources.list or try fixing it yourself, the message is very detailed already.Trinica wrote: Software index is broken
This is a major failure of your software management system. Please check for broken packages with synaptic, check the file permissions and correctness of the file '/etc/apt/sources.list' and reload the software information with: 'sudo apt-get update' and 'sudo apt-get install -f'.
Huzzahhhh. I'm not even sure how to check for dependencies if it won't open a .deb file at all.
Also the problem isn't opening the .deb, it fails before that because apts data is bricked.
Re: Bad Argument #1 to 'add' Using Tiled Map Editor
http://uberstudent.com/phpBB/viewtopic. ... lit=#p2626
So.....it turns out this is probably why I can't do anything. They're upgrading servers for my OS's repositories. Whether or not that's the entire issue is yet to be seen, but I should be able to try again in a few hours. =p
So.....it turns out this is probably why I can't do anything. They're upgrading servers for my OS's repositories. Whether or not that's the entire issue is yet to be seen, but I should be able to try again in a few hours. =p
Re: Bad Argument #1 to 'add' Using Tiled Map Editor
By your error message, It can't be the only issue :/Trinica wrote:http://uberstudent.com/phpBB/viewtopic. ... lit=#p2626
So.....it turns out this is probably why I can't do anything. They're upgrading servers for my OS's repositories. Whether or not that's the entire issue is yet to be seen, but I should be able to try again in a few hours. =p
Who is online
Users browsing this forum: Amazon [Bot] and 3 guests