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 / [Tier 2] - LoadSubImage

Author
Message
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 10th Feb 2016 08:51
Anyone got any ideas why I get no matching function error for the LoadSubImage command in xCode for the iOS template.

Using it in this sense:

The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 10th Feb 2016 09:19
Is it because you are assigning an image ID within LoadSubImage (i), rather than allowing it to return the image ID?

Try this instead:



or, if you need the image ID to be set to i, this:
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 10th Feb 2016 09:55 Edited at: 10th Feb 2016 10:55
Not sure where that other i came from but still no joy.

I am using this as a test with same result:



This is my tier 1 code:



It's as if the command isn't there in tier 2.


[EDIT] - Here is my code in C++ to match the tier 1 but not having LoadSubImage for some reason. Baffled


This is the error message:




This is the Class where it is being used:

The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!

Attachments

Login to view attachments
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 10th Feb 2016 17:38
Try using the following to convert the string to a char pointer.
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 10th Feb 2016 17:59
Hey cheers Paul, worked a treat!
My C++ is a bit rusty but getting there and it's coming back to me a bit at a time

The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 13th Feb 2016 21:58
Your 'if' loop looks like it might not be correct:


The loop will only execute if 'i' is equal to 'numberLvlBlocks'.

I think you probably want this instead:


The above will execute the loop contents as long as 'i' is less than or equal to 'numberLvlBlocks'.
Cheers,
Ancient Lady
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 16th Feb 2016 00:53
Oops, well spotted cheers for that.
The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!

Login to post a reply

Server time is: 2024-04-26 21:17:03
Your offset time is: 2024-04-26 21:17:03