Game freezes and crashes after menu if I call a function
Posted: Sat Mar 14, 2015 12:25 am
Hello, I'm fairly new to programming (I'd say I have like 2 weeks actually using lua and like 2 months of starting to read PIL) and so I started to make some sort of game (which doesn't really involve updating too many frames which is why I'm looking for a way to cap the fps to 30ish).
Anyway, I got the Menu screen down and the variables it should return to actually start the game, but I added a function (found in healthreward.lua) that I wanted to test, but whenever when I call it (Pressing "H" while on the play screen) LOVE will just freeze and crash. That's the only way to replicate the crash and I don't seem to figure out why it does that.
The code doesn't really use complex stuff because I'm not really too good neither experienced.
Sorry if I missed any points, but any help is greatly appreciated.
Here's the link to the .love file:
https://www.dropbox.com/sh/7wx1z6rxuxvu ... kINza?dl=0
Anyway, I got the Menu screen down and the variables it should return to actually start the game, but I added a function (found in healthreward.lua) that I wanted to test, but whenever when I call it (Pressing "H" while on the play screen) LOVE will just freeze and crash. That's the only way to replicate the crash and I don't seem to figure out why it does that.
The code doesn't really use complex stuff because I'm not really too good neither experienced.
Sorry if I missed any points, but any help is greatly appreciated.
Here's the link to the .love file:
https://www.dropbox.com/sh/7wx1z6rxuxvu ... kINza?dl=0