Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Game Development

Reply
 
LinkBack Thread Tools Display Modes
Old 08-24-2011, 04:30 AM   #1 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 3
ross is on a distinguished road
Default values getting mangled in function call

Hi all,

I'm getting this really bizarre problem now cropping up in my game... it only happens on a release build on my iPod - not on my iPad(just running same iPhone version).. and not on the simulator...

take a look at the code and the output and you'll see that the 'type' variable has been mangled. Anybody got any idea what could be causing this ??
Thanks!

code


- (int)AddStoneWallFarmint)xPosint)yPosint)inT ype
{
NsLog(@"AddStoneWallFarm(%d) xPos(%d) ypos(%d) type(%d)\n",numStoneWalls,xPos,yPos,(int)inType);
...
...


...
NsLog(@"Type = %d\n",(int)type);
...
switch(type)
...
case kOT_WallFarmYard:
case kOT_WallFarmYardLong:
{
//MyLog(@"Type = %d",(int)type);
[self AddStoneWallFarm:xPos:yPosint)type];
break;
};



output

...
...
Type = 31
Type = 42
AddStoneWallFarm(1) xPos(-4) ypos(159) type(742)


Thanks if you can help -
Ross
ross is offline   Reply With Quote
Old 09-01-2011, 10:57 AM   #2 (permalink)
Registered Member
 
Join Date: Aug 2008
Location: London/Peterborough
Posts: 562
QuantumDoja is on a distinguished road
Default

Look at your code, "inType" is different to "type", you need to post more of your code.

Code:
- (int)AddStoneWallFarm:(int)xPos:(int)yPos:(int)inType
NsLog(@"Type = %d\n",(int)type);
QuantumDoja is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 396
14 members and 382 guests
7twenty7, apatsufas, AppsBlogger, comicool, Creativ, Dalia, dansparrow, Duncan C, HemiMG, heshiming, LunarMoon, Murphy, pbart, Tomsky
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,676
Threads: 94,127
Posts: 402,915
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jleannex55
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 06:54 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0