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 / Sprites won't load on iPod

Author
Message
The Zoq2
15
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 4th Sep 2011 10:47
Hi, thanks to G T R i got the AppGameKit player working for my iPod touch... It works grate but some sprites won't load.

In the game im making, you are supposed to fly a helicopter and defend a island against enemy ships. But the island won't load. I tried to check if the sprite exists and if it dons't go back to loading the island again but for some reason the helicopter sprite turns into the island... An other strange bug I get is that each time I load the game onto my iPod the player says that the last error I got was that a sprite dosn't exist but the sprite isn't the same evry time...



That's all the code that loads sprites...

Srry about my english im from sweeden
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 4th Sep 2011 15:48
Why do you jump from lower case to upper case???
I know AppGameKit allows it, but it makes the code look sloppy.
Variable names like NAME Name and name are all the same but files may not work like that...
TargetMark = LoadImage("TargetMark.png")
Hellfire.ID = LoadImage( "targetMark.png" )

Maybe it can't load TargetMark.png, so that image ID remains a value of zero.
Then if you CreateSprite(0,whatever) it crashes, because...
"You may use an image ID of 0 to create a blank sprite drawn with color only. "

Just a thought.

The Zoq2
15
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 4th Sep 2011 20:50
I found the problem, turns ot I had written CreateSprite(island) instead of CreateSprite(Island,Island). It worked on the PC but on the Ipod LoadImage and createSprite returned diffirent variables...

BTW Targetmark wasn't the sprite that didn't work...

Srry about my english im from sweeden

Login to post a reply

Server time is: 2024-11-21 17:01:06
Your offset time is: 2024-11-21 17:01:06