Just a blind guess, but i think it may be the issue, you're not math.floor-ing the map (and emap) indexing code after you divide the grid coordinates with 32; usually it wouldn't be an issue, but double indexing errors out if you try to do [nil][anything], which you might be, given the previous reasoning. (it's not integer division, and you don't have fractional array values defined)
Math floor the self.grid / 32 expressions inside the []-s, and maybe it will work.
Error With Object Oriented Things
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- zorg
- Party member
- Posts: 3470
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Error With Object Oriented Things
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: Error With Object Oriented Things
I forgot to specify, sometimes instead of [ ] it's the . operator the one producing the error (which is another notation for the same thing).
Also, what zorg said.
Also, Windows users normally don't think of using print() as a debugging tool, because they don't have a console to look at the output. Opening Löve from the console as a console application (is lovec.exe still a thing?) will allow you to view the output of print() commands, which are priceless for debugging and finding out what values are causing problems.
Also, what zorg said.
Also, Windows users normally don't think of using print() as a debugging tool, because they don't have a console to look at the output. Opening Löve from the console as a console application (is lovec.exe still a thing?) will allow you to view the output of print() commands, which are priceless for debugging and finding out what values are causing problems.
- NotARaptor
- Citizen
- Posts: 59
- Joined: Thu Feb 22, 2018 3:15 pm
Re: Error With Object Oriented Things
On Windows you can force a console to appear by editing the conf.lua file. Print is invaluable for debugging
- zorg
- Party member
- Posts: 3470
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Error With Object Oriented Things
Both the conf.lua setting (and you should define your conf.lua-s as well!) and using lovec.exe is recommended!
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 17 guests