The darned 3rd map-file

Member
Posts: 95
Joined: 2009.09
Post: #1
Hey,

I load map's from my boundle with the code:

Code:
    NSString* path = [[[NSBundle bundleForClass:[self class]] resourcePath] stringByAppendingPathComponent:[NSString stringWithFormat:@"map%i.plist",mapNr]];

and I have the *.plist files:
map1.plist
map2.plist
map3.plist
map4.plist

Well now in the simulator everything works fine.
On the Iphone though, map3.plist will not be loaded, instead I get a very empty file.
Even if I delete map3.plist, change the "4" in map4.plist to a "3" (they have the same content till now) I get the same error when loading nr3.
If I change the 3 back to 4 , map4.plist is loaded fine again.

I'm going nuts here, help me pleeeease!

EDIT:
Alternatively tried:
Code:
    NSString* path = [[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"map%i",mapNr] ofType:@"plist"];
same result
Quote this message in a reply
Post Reply 


Messages In This Thread
The darned 3rd map-file - Bersaelor - Nov 10, 2009 05:42 PM
The darned 3rd map-file - AnotherJake - Nov 11, 2009, 12:10 AM
The darned 3rd map-file - Bersaelor - Nov 11, 2009, 03:56 AM
The darned 3rd map-file - AnotherJake - Nov 11, 2009, 08:31 AM
The darned 3rd map-file - Bersaelor - Nov 11, 2009, 09:03 AM
The darned 3rd map-file - AnotherJake - Nov 11, 2009, 09:04 AM
The darned 3rd map-file - ThemsAllTook - Nov 11, 2009, 09:36 AM
The darned 3rd map-file - Bersaelor - Nov 11, 2009, 02:47 PM