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 / [SOLVED] AGK Player for Ipad gives false error message constantly about 'Sprite does not exist'

Author
Message
Mark Garrett
Reviewed AGK on Steam
18
Years of Service
User Offline
Joined: 10th Jul 2005
Location: California, US
Posted: 26th Nov 2019 13:18 Edited at: 26th Nov 2019 13:53
My game plays fine on my PC, but when I Broadcast it to my Ipad, I get false error messages,

Failed to clone Sprite, Sprite (number) does not exist in main.agc at line (number).

As a result, my game does not play at all on my Ipad.

I have used AppGameKit player before on my IPAD and always works fine.
So, I deleted the AppGameKit player app, and then re-downloaded it , thinking the AppGameKit Player was corrupted, and if I re-downloaded it, it might work then... but that didn't work either.

Here is a sample of my code, although, like I say, the code is not the issue because works fine on my PC (WIndows 10)




Then, if I SetErrorMode(0), it runs the game, (I can hear the music playing in the background), And I see 2 large background Sprites on my Ipad,
but I can't play it, because there are none of the sprites in it that I tried to clone.
However, there are 2 large sprites show on my IPad that I did not try to clone. (The background sprites).
So, I think the CloneSprite() command is the issue.

The author of this post has marked a post as an answer.

Go to answer

Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 26th Nov 2019 18:31
The problem is clearly with id since text and sprite images can have the same identifiers. use the variable name instead of 1002 and 1003.
Mark Garrett
Reviewed AGK on Steam
18
Years of Service
User Offline
Joined: 10th Jul 2005
Location: California, US
Posted: 26th Nov 2019 19:42 Edited at: 26th Nov 2019 19:52
How should I create variables for my sprites?

Is there a special way of doing that?

I'm not sure how.

Up to now, I always use numbers, both for my sprites and the images they use.

I also use numbers for all my Text objects.

How do I start using variables instead??

I should probably let the AppGameKit make it's own variables like
or such like that, right?

I'd spend more time to figure it out, but gotta go right now. I'll be back in 2 hours though. Thankyou.
Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 26th Nov 2019 20:22



That's right, you will need to provide this AGK

Mark Garrett
Reviewed AGK on Steam
18
Years of Service
User Offline
Joined: 10th Jul 2005
Location: California, US
Posted: 26th Nov 2019 21:46 Edited at: 26th Nov 2019 22:33
I tried it, it didn't work.

But thanks just the same.
You are sincere, and you were trying to help.
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 26th Nov 2019 22:48
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 27th Nov 2019 06:43 Edited at: 27th Nov 2019 06:46
Quote: "I tried it, it didn't work."

what exactly does that mean? what was the error(s)?

meanwhile, a couple things

1) making sure that you realize qugurun offered 3 different code examples:

or

or

... it won't run as is if you copied/pasted it all at once.

2) Sprite1 = CreateSprite(GetImage("Ranch.png") as you offered can't work in any way (even if you properly added the last ")" where GetImage parameters have nothing to do with a filename.

2a) make sure the filename is precise regarding upper/lower case. IE, if your file is named "ranch.png", Windows will accept "Ranch.png" or "ranch.png" but (all?) mobile platforms should be more precise. IE, it it's "ranch.png", it won't recognize "Ranch.png" as valid.

i'll leave it at that until you offer a more-complete code example of what isn't working for you. what you've offered is obviously incomplete and there could be other things going on that could cause the CloneSprite error.

otherwise, here's a full working example of CloneSprite usage (where the code offered in the help file is horrible):

Mark Garrett
Reviewed AGK on Steam
18
Years of Service
User Offline
Joined: 10th Jul 2005
Location: California, US
Posted: 27th Nov 2019 09:56 Edited at: 27th Nov 2019 12:28
Thanks, Pops.

I have decided Is too complicated to work backwards and try to find my mistake. That it would be easier to find an earlier version of my game that still works on AppGameKit Player.

After looking through my saved game files, I have located an earlier version of my game saved on a file on file saving web application.
It works fine on 'AGK player' too.

So, what I have decided to do is develop it again from that earlier version.
And each stage of developement to test it each time to make sure it still works on AppGameKit player.
It shouldn't take more than few hours work.

Thank you so much.

Mark Garrett
Reviewed AGK on Steam
18
Years of Service
User Offline
Joined: 10th Jul 2005
Location: California, US
Posted: 27th Nov 2019 11:54 Edited at: 27th Nov 2019 12:27
This post has been marked by the post author as the answer.
Happy ending
By restoring my game from a previous version of it, It is up and running fine again and broadcasts perfectly on 'AGK player' on my IPAD.
What the problem was I'm still not sure, but it's up an running perfectly now.
Thank you for your concern and help.

Login to post a reply

Server time is: 2024-04-24 19:44:06
Your offset time is: 2024-04-24 19:44:06