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 / I'm getting a access violation error using the CreateText function - Tier 2

Author
Message
ThrOtherJoJo
12
Years of Service
User Offline
Joined: 24th Mar 2012
Location: California
Posted: 3rd Jul 2013 01:28
I'm getting an access violation error when I put the CreateText function in a constructor.

Can that function not be used in that manner.

CMyText
{
private:
UINT iTextIndex;


}

Joeisms
KG2Entertainment.com
ThrOtherJoJo
12
Years of Service
User Offline
Joined: 24th Mar 2012
Location: California
Posted: 3rd Jul 2013 01:34 Edited at: 3rd Jul 2013 01:36
Sorry. Hit the return button by mistake:

I'm getting an access violation error when I put the CreateText function in a constructor. I'm using version 1.07

Can that function not be used in that manner.




Joeisms
KG2Entertainment.com
basjak
14
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 3rd Jul 2013 01:39 Edited at: 3rd Jul 2013 01:43
I don't see a proper constructor in here:
it looks for me as you missed the semi column ';'


Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 3rd Jul 2013 02:52
Also if your object gets created before app::Begin() has run then AppGameKit is not setup yet and cannot create text objects. It is ok to create text in a constructor as long as the object is created after or during app::Begin()
ThrOtherJoJo
12
Years of Service
User Offline
Joined: 24th Mar 2012
Location: California
Posted: 3rd Jul 2013 04:04 Edited at: 3rd Jul 2013 04:05
@basjak
The semi-colon is in my code; it was that I just forgot to type it in my post.

But Paul is correct. I was trying to create it before the app::Begin. Thanks!

Joeisms
KG2Entertainment.com
Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 3rd Jul 2013 11:32
No need to make a new post, if you mess it up, just edit the original one

----------------
AGK programmer
Did Amiga / AMOS programming in the 90's.

Login to post a reply

Server time is: 2024-05-04 04:54:07
Your offset time is: 2024-05-04 04:54:07