Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / AGK Crashes while creating sprite from class

Author
Message
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 24th Feb 2012 22:41
Hey.

I have my main template.cpp file and loading_class.h + loading_class.cpp files, which define loadingbar class.

Here's the whole loading_class.h:




Here's a part of loading_class.cpp:



And here's main template.cpp:




Though, app opens and immediately exits, without any error.

Is this possible that I cannot create sprites from classes?

KareDev
12
Years of Service
User Offline
Joined: 6th Feb 2012
Location:
Posted: 24th Feb 2012 22:52
This could be totally wrong and out of the left field, as I know precious little about C++ - but I notice that in your first code snippet you have "public" twice. Shouldn't you have one "public" and one "private"?

Just ignore if this is totally barking up the wrong tree. I know a fair bit about C but surprisingly little about C++.
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 24th Feb 2012 23:02 Edited at: 24th Feb 2012 23:02
Quote: ""public" and one "private"?"


Nope It's completely un-relevant. Privates aren't a must.

kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 25th Feb 2012 09:59
@EDIT

Solved.

You cannot initialize a class which makes sprites on initial setup off-loop/begin functions.

Login to post a reply

Server time is: 2024-05-02 01:34:33
Your offset time is: 2024-05-02 01:34:33