Search found 9 matches

by savagedogg38
Mon Jan 12, 2015 12:16 am
Forum: Support and Development
Topic: Cannot load more the one class object
Replies: 16
Views: 11365

Re: Cannot load more the one class object

Thanks guys - you all gave me a lot a good information to wrap my head around so that's what I'm going to do for a bit. Thanks again. I'll refine my code after I get a grasp of how objects are created, but form what I understand so far, simply assignment a variable a table creates the object? So it ...
by savagedogg38
Mon Jan 12, 2015 12:03 am
Forum: Support and Development
Topic: Cannot load more the one class object
Replies: 16
Views: 11365

Re: Cannot load more the one class object

Hey savagedogg38, I think it would be good to point out that you are using the SECS library to create your classes. Always try to give info like that. ;) Also, providing the .love file directly helps people play with it and get at it quicker. Anyway, from the recent code and playing with it, I see ...
by savagedogg38
Mon Jan 12, 2015 12:00 am
Forum: Support and Development
Topic: Cannot load more the one class object
Replies: 16
Views: 11365

Re: Cannot load more the one class object

Please use code tags in the future. Now, the problem is that you call 'badie:init', which expects a badie object, and initialises it. Well, that's not what we have, so we need to construct an object and initialise that. We could do b = {} badie.init(b, math.random(800), math.random(600)) Or, since ...
by savagedogg38
Sun Jan 11, 2015 11:58 pm
Forum: Support and Development
Topic: Cannot load more the one class object
Replies: 16
Views: 11365

Re: Cannot load more the one class object

Sorry, just saw your post about code tags - I will look into it. thanks!
by savagedogg38
Sun Jan 11, 2015 11:50 pm
Forum: Support and Development
Topic: Cannot load more the one class object
Replies: 16
Views: 11365

Re: Cannot load more the one class object

After trying it, it jogged my memory. This, the suggestions I have gotten so far, is where I started and was only able to have one instance at a time. The method I have above gives me as many instances as I want. thanks though - I do think the suggestions I got so far are similar if not exactly wher...
by savagedogg38
Sun Jan 11, 2015 11:47 pm
Forum: Support and Development
Topic: Cannot load more the one class object
Replies: 16
Views: 11365

Re: Cannot load more the one class object

I actually did a very crude hack to get it working. I dropped dependence on class.lua entirely. I'm going to try you suggestion anyway but if you would like to review what I have done, you can check it out on my github. All I changed was the init function. I'll copy at post it below for ease too, bu...
by savagedogg38
Sun Jan 11, 2015 10:47 pm
Forum: Support and Development
Topic: Cannot load more the one class object
Replies: 16
Views: 11365

Re: Cannot load more the one class object

New version with changes per suggestion up on github for review for anyone wanting to take a look. thanks again all. function game_load(map) love.graphics.setBackgroundColor(100,100,100) b = badie:init( math.random(800), math.random(600)) end function game_update(dt) b:update(dt) end function game_d...
by savagedogg38
Sun Jan 11, 2015 10:42 pm
Forum: Support and Development
Topic: Cannot load more the one class object
Replies: 16
Views: 11365

Re: Cannot load more the one class object

I thought I may have tried your suggestion before which led me to the wacky version you see - I was trying anything at that point - but I tried it again just to be sure. I got game.lua:12: attempt top index global 'b' (a nil value) - for some reason it isn't creating an instance - but my badie.lua l...
by savagedogg38
Sun Jan 11, 2015 1:22 pm
Forum: Support and Development
Topic: Cannot load more the one class object
Replies: 16
Views: 11365

Cannot load more the one class object

I cannot seem to manage more than one object - in my case, badie - at a time. I can have it to where, in "game" mode, I have one ball, or badie, moving about on screen at one time. Been trying everything I can think of and following all the object oriental tutorials I can find, but I'm at ...